lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 Jun 2012 19:12:54 +0300
From:	Boaz Harrosh <bharrosh@...asas.com>
To:	Artem Bityutskiy <dedekind1@...il.com>
CC:	Linux FS Maling List <linux-fsdevel@...r.kernel.org>,
	Linux Kernel Maling List <linux-kernel@...r.kernel.org>,
	Benny Halevy <bhalevy@...ian.com>, <osd-dev@...n-osd.org>
Subject: Re: [PATCH] exofs: stop using s_dirt

On 06/04/2012 02:48 PM, Artem Bityutskiy wrote:

> From: Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>
> 
> Exofs has the '->write_super()' handler and makes some use of the '->s_dirt'
> superblock flag, but it really needs neither of them because it never sets
> 's_dirt' to one which means the VFS never calls its '->write_super()' handler.
> Thus, remove both.
> 


Thanks Artem. I have seen your other FS conversions and thought I would
eventually need to also do it for exofs, thanks for beating me to it ;-)

I have removed all uses of sb->s_dirt = 1 cases around last year, by
writing the SB-info as part of the create/delete commands directly. So
I agree it is not needed anymore see here
	1cea312 exofs: Write sbi->s_nextid as part of the Create command

I have one question though, which I did not understand at the time?

Today at exofs_write_super() we call exofs_sync_fs() (super_operations->sync_fs)
Who/when calls ->sync_fs() without the ->write_super() below.

But otherwise I agree that sb->s_dirt = 1 and ->write_super() are not needed
at all, for regular operations.

Should I take this for 3.6 through my tree. Or do you want my:

Ack-by: Boaz Harrosh <bharrosh@...asas.com>

> Note, I am trying to remove both 's_dirt' and 'write_super()' from VFS
> altogether once all users are gone.
> 
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>
> ---
>  fs/exofs/super.c |   11 -----------
>  1 files changed, 0 insertions(+), 11 deletions(-)
> 
> diff --git a/fs/exofs/super.c b/fs/exofs/super.c
> index 735ca06..6e1c515 100644
> --- a/fs/exofs/super.c
> +++ b/fs/exofs/super.c
> @@ -400,8 +400,6 @@ static int exofs_sync_fs(struct super_block *sb, int wait)
>  	ret = ore_write(ios);
>  	if (unlikely(ret))
>  		EXOFS_ERR("%s: ore_write failed.\n", __func__);
> -	else
> -		sb->s_dirt = 0;
>  
>  
>  	unlock_super(sb);
> @@ -412,14 +410,6 @@ out:
>  	return ret;
>  }
>  
> -static void exofs_write_super(struct super_block *sb)
> -{
> -	if (!(sb->s_flags & MS_RDONLY))
> -		exofs_sync_fs(sb, 1);
> -	else
> -		sb->s_dirt = 0;
> -}
> -
>  static void _exofs_print_device(const char *msg, const char *dev_path,
>  				struct osd_dev *od, u64 pid)
>  {
> @@ -942,7 +932,6 @@ static const struct super_operations exofs_sops = {
>  	.write_inode    = exofs_write_inode,
>  	.evict_inode    = exofs_evict_inode,
>  	.put_super      = exofs_put_super,
> -	.write_super    = exofs_write_super,
>  	.sync_fs	= exofs_sync_fs,
>  	.statfs         = exofs_statfs,
>  };


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ