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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 Dec 2018 14:49:49 +0100
From:   Jan Kara <jack@...e.cz>
To:     Kanchan Joshi <joshi.k@...sung.com>
Cc:     linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        tytso@....edu, adilger.kernel@...ger.ca, jack@...e.com,
        viro@...iv.linux.org.uk, darrick.wong@...cle.com, axboe@...nel.dk,
        jrdr.linux@...il.com, ebiggers@...gle.com,
        jooyoung.hwang@...sung.com, chur.lee@...sung.com,
        prakash.v@...sung.com
Subject: Re: [PATCH 1/2] fs: introduce APIs to enable sending write-hint with
 buffer-head

On Mon 10-12-18 18:20:03, Kanchan Joshi wrote:
> submit_bh and write_dirty_buffer do not take write-hint as
> parameter. This patch introduces variants which do.
> 
> Signed-off-by: Kanchan Joshi <joshi.k@...sung.com>

...

> @@ -3162,6 +3169,20 @@ void write_dirty_buffer(struct buffer_head *bh, int op_flags)
>  }
>  EXPORT_SYMBOL(write_dirty_buffer);
>  
> +void write_dirty_buffer_write_hint(struct buffer_head *bh, int op_flags,
> +				   enum rw_hint hint)
> +{
> +	lock_buffer(bh);
> +	if (!test_clear_buffer_dirty(bh)) {
> +		unlock_buffer(bh);
> +		return;
> +	}
> +	bh->b_end_io = end_buffer_write_sync;
> +	get_bh(bh);
> +	submit_bh_wbc(REQ_OP_WRITE, op_flags, bh, hint, NULL);
> +}
> +EXPORT_SYMBOL(write_dirty_buffer_write_hint);
> +

Please implement write_dirty_buffer() as a call to
write_dirty_buffer_write_hint() so that we don't unnecessarily duplicate
the code. Otherwise the patch looks good.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ