[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <85d2aef9-b966-4c90-8602-ba5961efc23a@oracle.com>
Date: Mon, 26 Feb 2024 09:36:37 +0000
From: John Garry <john.g.garry@...cle.com>
To: "Ritesh Harjani (IBM)" <ritesh.list@...il.com>, axboe@...nel.dk,
kbusch@...nel.org, hch@....de, sagi@...mberg.me, jejb@...ux.ibm.com,
martin.petersen@...cle.com, djwong@...nel.org, viro@...iv.linux.org.uk,
brauner@...nel.org, dchinner@...hat.com, jack@...e.cz
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-fsdevel@...r.kernel.org,
tytso@....edu, jbongio@...gle.com, linux-scsi@...r.kernel.org,
ojaswin@...ux.ibm.com, linux-aio@...ck.org,
linux-btrfs@...r.kernel.org, io-uring@...r.kernel.org,
nilay@...ux.ibm.com,
Prasad Singamsetty <prasad.singamsetty@...cle.com>
Subject: Re: [PATCH v4 06/11] block: Add atomic write support for statx
On 25/02/2024 14:20, Ritesh Harjani (IBM) wrote:
> John Garry <john.g.garry@...cle.com> writes:
>
>> From: Prasad Singamsetty <prasad.singamsetty@...cle.com>
>>
>> Extend statx system call to return additional info for atomic write support
>> support if the specified file is a block device.
>>
>> Signed-off-by: Prasad Singamsetty <prasad.singamsetty@...cle.com>
>> Signed-off-by: John Garry <john.g.garry@...cle.com>
>> ---
>> block/bdev.c | 37 +++++++++++++++++++++++++++----------
>> fs/stat.c | 13 ++++++-------
>> include/linux/blkdev.h | 5 +++--
>> 3 files changed, 36 insertions(+), 19 deletions(-)
>>
>> diff --git a/block/bdev.c b/block/bdev.c
>> index e9f1b12bd75c..0dada9902bd4 100644
>> --- a/block/bdev.c
>> +++ b/block/bdev.c
>> @@ -1116,24 +1116,41 @@ void sync_bdevs(bool wait)
>> iput(old_inode);
>> }
>>
>> +#define BDEV_STATX_SUPPORTED_MASK (STATX_DIOALIGN | STATX_WRITE_ATOMIC)
>> +
>> /*
>> - * Handle STATX_DIOALIGN for block devices.
>> - *
>> - * Note that the inode passed to this is the inode of a block device node file,
>> - * not the block device's internal inode. Therefore it is *not* valid to use
>> - * I_BDEV() here; the block device has to be looked up by i_rdev instead.
>> + * Handle STATX_{DIOALIGN, WRITE_ATOMIC} for block devices.
>> */
>> -void bdev_statx_dioalign(struct inode *inode, struct kstat *stat)
>> +void bdev_statx(struct dentry *dentry, struct kstat *stat, u32 request_mask)
>
> why change this to dentry? Why not keep it as inode itself?
I suppose that I could do that.
Thanks,
John
Powered by blists - more mailing lists