2020-04-27 10:51:02

by Christoph Hellwig

[permalink] [raw]
Subject: ext4 fiemap and the inode lock

Hi Ritesh,

before you converted ext4 to use iomap for fiemap, the indirect block
case used generic_block_fiemap and thus took i_rwsem around the
actual fiemap operation. Do you remember if you did an audit if it
was ok to drop it, or did that just slip in?


2020-04-27 14:48:03

by Ritesh Harjani

[permalink] [raw]
Subject: Re: ext4 fiemap and the inode lock

Hello Christoph,

On 4/27/20 4:20 PM, Christoph Hellwig wrote:
> Hi Ritesh,
>
> before you converted ext4 to use iomap for fiemap, the indirect block
> case used generic_block_fiemap and thus took i_rwsem around the
> actual fiemap operation. Do you remember if you did an audit if it
> was ok to drop it, or did that just slip in?

So, maybe since maybe the request was only to provide the block mapping
and since extent path didn't have it - so I may have not added it into
the indirect block case as well. Assuming both anyways uses same
-> i_data_sem lock. But I am not sure if it was deliberately dropped,
otherwise I would have noted that in my cover letter. So maybe it got
missed. But I will try and search in internal dev branches too, to see
if I could find anything related to that.

Thanks for noting that.

-ritesh