* [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
@ 2015-12-28 10:12 Chao Yu
2015-12-28 22:53 ` Jaegeuk Kim
0 siblings, 1 reply; 4+ messages in thread
From: Chao Yu @ 2015-12-28 10:12 UTC (permalink / raw)
To: Jaegeuk Kim; +Cc: linux-f2fs-devel, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
2015-12-28 10:12 [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs Chao Yu
@ 2015-12-28 22:53 ` Jaegeuk Kim
2015-12-29 6:26 ` Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: Jaegeuk Kim @ 2015-12-28 22:53 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-f2fs-devel, linux-kernel
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
2015-12-28 22:53 ` Jaegeuk Kim
@ 2015-12-29 6:26 ` Chao Yu
2015-12-30 0:44 ` Jaegeuk Kim
0 siblings, 1 reply; 4+ messages in thread
From: Chao Yu @ 2015-12-29 6:26 UTC (permalink / raw)
To: 'Jaegeuk Kim'; +Cc: linux-f2fs-devel, linux-kernel
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
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs
2015-12-29 6:26 ` Chao Yu
@ 2015-12-30 0:44 ` Jaegeuk Kim
0 siblings, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2015-12-30 0:44 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-f2fs-devel, linux-kernel
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
> > >
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-30 0:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-28 10:12 [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fs Chao Yu
2015-12-28 22:53 ` Jaegeuk Kim
2015-12-29 6:26 ` Chao Yu
2015-12-30 0:44 ` Jaegeuk Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).