Re: [PATCH 3/5] f2fs: move f2fs_balance_fs to correct place in unlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013-03-02 (토), 12:41 +0900, Namjae Jeon:
> From: Namjae Jeon <namjae.jeon@xxxxxxxxxxx>
> 
> Actual dirty of pages will occur in f2fs_delete_entry so move the
> f2fs_balance_fs just before deletion.
> 
> Signed-off-by: Namjae Jeon <namjae.jeon@xxxxxxxxxxx>
> Signed-off-by: Amit Sahrawat <a.sahrawat@xxxxxxxxxxx>
> ---
>  fs/f2fs/namei.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
> index 1a49b88..eaa86f5 100644
> --- a/fs/f2fs/namei.c
> +++ b/fs/f2fs/namei.c
> @@ -223,8 +223,6 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
>  	struct page *page;
>  	int err = -ENOENT;
>  
> -	f2fs_balance_fs(sbi);
> -
>  	de = f2fs_find_entry(dir, &dentry->d_name, &page);
>  	if (!de)
>  		goto fail;
> @@ -236,6 +234,8 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
>  		goto fail;
>  	}
>  
> +	f2fs_balance_fs(sbi);
> +

I think we don't need to do this because of no issues on performance and
reliability.
In addition, it would be better to call f2fs_balance_fs without any
dentry page.

>  	f2fs_delete_entry(de, page, inode);
>  
>  	/* In order to evict this inode,  we set it dirty */

-- 
Jaegeuk Kim
Samsung

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux