mbox series

[v2,0/3] btrfs llseek improvement, take 2

Message ID 20190927102318.12830-1-nborisov@suse.com (mailing list archive)
Headers show
Series btrfs llseek improvement, take 2 | expand

Message

Nikolay Borisov Sept. 27, 2019, 10:23 a.m. UTC
Here is v2 of the llseek improvements, main changes are: 

 * Patch 1 - changed the locking scheme. I'm now using inode_lock_shared since 
 holding the extent lock is not sufficient to prevent concurrent truncates. 

 * Fixed lingo bugs in patch 2 changelog (Johaness)

Nikolay Borisov (3):
  btrfs: Speed up btrfs_file_llseek
  btrfs: Simplify btrfs_file_llseek
  btrfs: Return offset from find_desired_extent

 fs/btrfs/file.c | 62 ++++++++++++++++++++++---------------------------
 1 file changed, 28 insertions(+), 34 deletions(-)

Comments

David Sterba Sept. 27, 2019, 1:13 p.m. UTC | #1
On Fri, Sep 27, 2019 at 01:23:15PM +0300, Nikolay Borisov wrote:
> Here is v2 of the llseek improvements, main changes are: 
> 
>  * Patch 1 - changed the locking scheme. I'm now using inode_lock_shared since 
>  holding the extent lock is not sufficient to prevent concurrent truncates. 

Regarding the offline discussions, I'd like to see more people look at
that until we're sure that it works, namely seek vs truncate and extent
range locking.
Christoph Hellwig Sept. 27, 2019, 5:03 p.m. UTC | #2
On Fri, Sep 27, 2019 at 01:23:15PM +0300, Nikolay Borisov wrote:
> Here is v2 of the llseek improvements, main changes are: 

Btw, with Goldwyn looking into btrfs iomap support wouldn't it make
sense to try to reuse the iomap lseek code?
Nikolay Borisov Sept. 27, 2019, 5:16 p.m. UTC | #3
On 27.09.19 г. 20:03 ч., Christoph Hellwig wrote:
>> Here is v2 of the llseek improvements, main changes are: 
> Btw, with Goldwyn looking into btrfs iomap support wouldn't it make
> sense to try to reuse the iomap lseek code?
> 

When that code lands - yes. ATM - there are more pressing stuff.
David Sterba Oct. 17, 2019, 5:56 p.m. UTC | #4
On Fri, Sep 27, 2019 at 01:23:15PM +0300, Nikolay Borisov wrote:
> Here is v2 of the llseek improvements, main changes are: 
> 
>  * Patch 1 - changed the locking scheme. I'm now using inode_lock_shared since 
>  holding the extent lock is not sufficient to prevent concurrent truncates. 
> 
>  * Fixed lingo bugs in patch 2 changelog (Johaness)
> 
> Nikolay Borisov (3):
>   btrfs: Speed up btrfs_file_llseek
>   btrfs: Simplify btrfs_file_llseek
>   btrfs: Return offset from find_desired_extent

Moved from topic branch to misc-next. Thanks.