Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1298583 > unrolled thread

[PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs

Started byChao Yu <chao2.yu@samsung.com>
First post2015-12-28 11:20 +0100
Last post2015-12-30 01:50 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs Chao Yu <chao2.yu@samsung.com> - 2015-12-28 11:20 +0100
    Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly  fs Jaegeuk Kim <jaegeuk@kernel.org> - 2015-12-29 00:00 +0100
      RE: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs Chao Yu <chao2.yu@samsung.com> - 2015-12-29 07:30 +0100
        Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly  fs Jaegeuk Kim <jaegeuk@kernel.org> - 2015-12-30 01:50 +0100

#1298583 — [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs

FromChao Yu <chao2.yu@samsung.com>
Date2015-12-28 11:20 +0100
Subject[PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
Message-ID<qKD4h-sS-53@gated-at.bofh.it>
If filesystem is readonly, don't recover inline dot inode.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
---
 fs/f2fs/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 5cc4128..b4a5836 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -269,7 +269,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
 	if (IS_ERR(inode))
 		return ERR_CAST(inode);
 
-	if (f2fs_has_inline_dots(inode)) {
+	if (f2fs_has_inline_dots(inode) && !f2fs_readonly(dir->i_sb)) {
 		err = __recover_dot_dentries(inode, dir->i_ino);
 		if (err)
 			goto err_out;
-- 
2.6.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1298785 — Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs

FromJaegeuk Kim <jaegeuk@kernel.org>
Date2015-12-29 00:00 +0100
SubjectRe: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
Message-ID<qKOVJ-64-23@gated-at.bofh.it>
In reply to#1298583
Hi Chao,

On Mon, Dec 28, 2015 at 06:12:45PM +0800, Chao Yu wrote:
> If filesystem is readonly, don't recover inline dot inode.
> 
> Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> ---
>  fs/f2fs/namei.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
> index 5cc4128..b4a5836 100644
> --- a/fs/f2fs/namei.c
> +++ b/fs/f2fs/namei.c
> @@ -269,7 +269,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
>  	if (IS_ERR(inode))
>  		return ERR_CAST(inode);
>  
> -	if (f2fs_has_inline_dots(inode)) {
> +	if (f2fs_has_inline_dots(inode) && !f2fs_readonly(dir->i_sb)) {

We need to return -EROFS if f2fs is readonly?

Thanks,

>  		err = __recover_dot_dentries(inode, dir->i_ino);
>  		if (err)
>  			goto err_out;
> -- 
> 2.6.3
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1298898

FromChao Yu <chao2.yu@samsung.com>
Date2015-12-29 07:30 +0100
Message-ID<qKVXb-53Y-1@gated-at.bofh.it>
In reply to#1298785
Hi Jaegeuk,

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> Sent: Tuesday, December 29, 2015 6:54 AM
> To: Chao Yu
> Cc: linux-f2fs-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
> 
> Hi Chao,
> 
> On Mon, Dec 28, 2015 at 06:12:45PM +0800, Chao Yu wrote:
> > If filesystem is readonly, don't recover inline dot inode.
> >
> > Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> > ---
> >  fs/f2fs/namei.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
> > index 5cc4128..b4a5836 100644
> > --- a/fs/f2fs/namei.c
> > +++ b/fs/f2fs/namei.c
> > @@ -269,7 +269,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
> >  	if (IS_ERR(inode))
> >  		return ERR_CAST(inode);
> >
> > -	if (f2fs_has_inline_dots(inode)) {
> > +	if (f2fs_has_inline_dots(inode) && !f2fs_readonly(dir->i_sb)) {
> 
> We need to return -EROFS if f2fs is readonly?

In a readonly mountpoint, we should still allow user to stat file/dir in
directory structure, rather than returning -EROFS when trying to recover,
Right?

Thanks,

> 
> Thanks,
> 
> >  		err = __recover_dot_dentries(inode, dir->i_ino);
> >  		if (err)
> >  			goto err_out;
> > --
> > 2.6.3
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1299180 — Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs

FromJaegeuk Kim <jaegeuk@kernel.org>
Date2015-12-30 01:50 +0100
SubjectRe: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
Message-ID<qLd7I-7Ke-9@gated-at.bofh.it>
In reply to#1298898
Hi Chao,

On Tue, Dec 29, 2015 at 02:26:53PM +0800, Chao Yu wrote:
> Hi Jaegeuk,
> 
> > -----Original Message-----
> > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org]
> > Sent: Tuesday, December 29, 2015 6:54 AM
> > To: Chao Yu
> > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
> > 
> > Hi Chao,
> > 
> > On Mon, Dec 28, 2015 at 06:12:45PM +0800, Chao Yu wrote:
> > > If filesystem is readonly, don't recover inline dot inode.
> > >
> > > Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> > > ---
> > >  fs/f2fs/namei.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
> > > index 5cc4128..b4a5836 100644
> > > --- a/fs/f2fs/namei.c
> > > +++ b/fs/f2fs/namei.c
> > > @@ -269,7 +269,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
> > >  	if (IS_ERR(inode))
> > >  		return ERR_CAST(inode);
> > >
> > > -	if (f2fs_has_inline_dots(inode)) {
> > > +	if (f2fs_has_inline_dots(inode) && !f2fs_readonly(dir->i_sb)) {
> > 
> > We need to return -EROFS if f2fs is readonly?
> 
> In a readonly mountpoint, we should still allow user to stat file/dir in
> directory structure, rather than returning -EROFS when trying to recover,
> Right?

As you suggested, we'd better remain some kernel messages. ;)

Thanks,

> 
> Thanks,
> 
> > 
> > Thanks,
> > 
> > >  		err = __recover_dot_dentries(inode, dir->i_ino);
> > >  		if (err)
> > >  			goto err_out;
> > > --
> > > 2.6.3
> > >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web