[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <2e15501c-cbdd-aca2-19fd-4519093cacab@samsung.com>
Date: Tue, 11 Dec 2018 17:27:16 +0530
From: Kanchan Joshi <joshi.k@...sung.com>
To: Jan Kara <jack@...e.cz>
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
Thank you for review and suggestion.
I will make that change in V2, once things become clear for second patch
of this set.
On Monday 10 December 2018 07:19 PM, Jan Kara wrote:
> 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
>
Powered by blists - more mailing lists