Re: Patch "Btrfs: do not start a transaction during fiemap"

2019-05-29 Thread Christoph Anton Mitterer
Hey David. Regarding your patch "Btrfs: do not start a transaction during fiemap"... I assume since the blockdevice had to be set read-only in order for the bug to happen... all these aborted transactions, etc. couldn't cause any corruptions/etc. upon the fs,... so there's

Re: Traces during logical_ino ioctl, slowdown, etc (was Re: [PATCH] Btrfs: do not start a transaction during fiemap)

2019-04-17 Thread Zygo Blaxell
On Wed, Apr 17, 2019 at 05:40:55PM +, Filipe Manana wrote: > On Wed, Apr 17, 2019 at 5:50 PM Zygo Blaxell > wrote: > > > > It looks like btrfs_ioctl_logical_to_ino can set: > > > > > > > > path->search_commit_root = 1; > > > > > > > > just before calling iterate_inodes_from_logical, bu

Traces during logical_ino ioctl, slowdown, etc (was Re: [PATCH] Btrfs: do not start a transaction during fiemap)

2019-04-17 Thread Filipe Manana
On Wed, Apr 17, 2019 at 5:50 PM Zygo Blaxell wrote: > > On Wed, Apr 17, 2019 at 09:22:44AM +, Filipe Manana wrote: > > On Wed, Apr 17, 2019 at 1:08 AM Zygo Blaxell > > wrote: > > > > > > On Mon, Apr 15, 2019 at 09:29:00AM +0100, fdman...@kernel.org wrote: > > > > From: Filipe Manana > > > >

Re: [PATCH] Btrfs: do not start a transaction during fiemap

2019-04-17 Thread Zygo Blaxell
On Wed, Apr 17, 2019 at 09:22:44AM +, Filipe Manana wrote: > On Wed, Apr 17, 2019 at 1:08 AM Zygo Blaxell > wrote: > > > > On Mon, Apr 15, 2019 at 09:29:00AM +0100, fdman...@kernel.org wrote: > > > From: Filipe Manana > > > > > > During fiemap, for regular extents (non inline) we need to chec

Re: [PATCH] Btrfs: do not start a transaction during fiemap

2019-04-17 Thread David Sterba
On Wed, Apr 17, 2019 at 09:22:44AM +, Filipe Manana wrote: > On Wed, Apr 17, 2019 at 1:08 AM Zygo Blaxell > wrote: > > > > On Mon, Apr 15, 2019 at 09:29:00AM +0100, fdman...@kernel.org wrote: > > > From: Filipe Manana > > > > > > During fiemap, for regular extents (non inline) we need to chec

Re: [PATCH] Btrfs: do not start a transaction during fiemap

2019-04-17 Thread Filipe Manana
On Wed, Apr 17, 2019 at 1:08 AM Zygo Blaxell wrote: > > On Mon, Apr 15, 2019 at 09:29:00AM +0100, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > During fiemap, for regular extents (non inline) we need to check if they > > are shared and if they are, set the shared bit. Checking if an

Re: [PATCH] Btrfs: do not start a transaction during fiemap

2019-04-16 Thread Zygo Blaxell
On Mon, Apr 15, 2019 at 09:29:00AM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > During fiemap, for regular extents (non inline) we need to check if they > are shared and if they are, set the shared bit. Checking if an extent is > shared requires checking the delayed references of t

Re: [PATCH] Btrfs: do not start a transaction during fiemap

2019-04-15 Thread Qu Wenruo
[snip] >> >> My concern is, if at this timing there is no running transaction, so we >> continue with trans == NULL. >> >> But before we continue, some one started a transaction and >> increased/decreased the extent reference number, this doesn't look as safe. > > So? > > If an extent is not sha

Re: [PATCH] Btrfs: do not start a transaction during fiemap

2019-04-15 Thread Filipe Manana
On Mon, Apr 15, 2019 at 9:45 AM Qu Wenruo wrote: > > > > On 2019/4/15 下午4:29, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > During fiemap, for regular extents (non inline) we need to check if they > > are shared and if they are, set the shared bit. Checking if an extent is > > shared

Re: [PATCH] Btrfs: do not start a transaction during fiemap

2019-04-15 Thread Qu Wenruo
On 2019/4/15 下午4:29, fdman...@kernel.org wrote: > From: Filipe Manana > > During fiemap, for regular extents (non inline) we need to check if they > are shared and if they are, set the shared bit. Checking if an extent is > shared requires checking the delayed references of the currently runnin

[PATCH] Btrfs: do not start a transaction during fiemap

2019-04-15 Thread fdmanana
From: Filipe Manana During fiemap, for regular extents (non inline) we need to check if they are shared and if they are, set the shared bit. Checking if an extent is shared requires checking the delayed references of the currently running transaction, since some reference might have not yet hit t