f2fs: fix to stop recovering dot dentries in a readonly fs
PATCH 1/1 f2fs: fix to stop recovering dot dentries in a readonly fs
If filesystem is readonly, don't recover inline dot inode.
--- fs/f2fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/namei.c +1 -1
@@ -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;
Signature · 1 line
2.6.3
Jaegeuk Kim
maintainerHi Chao,
Quoted 12 lines · Chao Yu
If filesystem is readonly, don't recover inline dot inode.
Signed-off-by Chao Yu <[email protected]>--- fs/f2fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/namei.c +0
-0
fs/f2fs/namei.c static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, · line 272
Quoted 5 lines
fs/f2fs/namei.c +1
-1@@ -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,
Quoted 6 lines
fs/f2fs/namei.c +0
-0err =__recover_dot_dentries (inode, dir->i_ino);if (err) goto err_out;Signature · 1 line
2.6.3
Hi Jaegeuk,
Quoted 25 lines
-----Original Message-----
From: Jaegeuk Kim [mailto:[email protected]]
Sent: Tuesday, December 29, 2015 6:54 AM
To: Chao Yu
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fsHi Chao,
Quoted 15 lines · Chao Yu
If filesystem is readonly, don't recover inline dot inode.
Signed-off-by Chao Yu <[email protected]>--- fs/f2fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/namei.c +0
-0@@ -269,7 +269,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,if (IS_ERR (inode))return ERR_CAST (inode);
Quoted 4 lines
fs/f2fs/namei.c static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, · line 272
Quoted 2 lines
fs/f2fs/namei.c +1
-1-if (f2fs_has_inline_dots (inode)) { +if (f2fs_has_inline_dots (inode) && !f2fs_readonly (dir->i_sb)) {We need to return
-EROFSif 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,
Quoted 9 lines
Thanks,
Quoted 6 lines
fs/f2fs/namei.c +0
-1err =__recover_dot_dentries (inode, dir->i_ino);if (err) goto err_out; --2.6.3
Jaegeuk Kim
maintainerHi Chao,
Quoted 27 lines · Chao Yu
Hi Jaegeuk,
Quoted 25 lines
-----Original Message-----
From: Jaegeuk Kim [mailto:[email protected]]
Sent: Tuesday, December 29, 2015 6:54 AM
To: Chao Yu
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] f2fs: fix to stop recovering dot dentries in a readonly fsHi Chao,
Quoted 15 lines · Chao Yu
If filesystem is readonly, don't recover inline dot inode.
Signed-off-by Chao Yu <[email protected]>--- fs/f2fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/namei.c +0
-0@@ -269,7 +269,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,if (IS_ERR (inode))return ERR_CAST (inode);
Quoted 8 lines
Quoted 4 lines
fs/f2fs/namei.c static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, · line 272
Quoted 2 lines
fs/f2fs/namei.c +1
-1-if (f2fs_has_inline_dots (inode)) { +if (f2fs_has_inline_dots (inode) && !f2fs_readonly (dir->i_sb)) {We need to return
-EROFSif f2fs is readonly?In a readonly mountpoint, we should still allow user to stat file/dir in directory structure, rather than returning
-EROFSwhen trying to recover, Right?
As you suggested, we'd better remain some kernel messages. ;)
Thanks,
Quoted 12 lines
Thanks,
Quoted 9 lines
Thanks,
Quoted 6 lines
fs/f2fs/namei.c +0
-1err =__recover_dot_dentries (inode, dir->i_ino);if (err) goto err_out; --2.6.3