On Thu, Jul 19, 2018 at 3:50 PM, Josef Bacik <jo...@toxicpanda.com> wrote: > Since we've changed the fsync() path to always run ordered extents > before doing the tree log we no longer need to take the dio_sem in the > tree log path. This gets rid of a lockdep splat that I was seeing with > the AIO tests.
The dio_sem can be removed completely, it was added to synchronize lockless dio writes with fsync to avoid races. I.e., just removing it here in the tree-log makes it useless. thanks! > > Signed-off-by: Josef Bacik <jo...@toxicpanda.com> > --- > fs/btrfs/tree-log.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c > index f8220ec02036..aa06e1954b84 100644 > --- a/fs/btrfs/tree-log.c > +++ b/fs/btrfs/tree-log.c > @@ -4439,7 +4439,6 @@ static int btrfs_log_changed_extents(struct > btrfs_trans_handle *trans, > > INIT_LIST_HEAD(&extents); > > - down_write(&inode->dio_sem); > write_lock(&tree->lock); > test_gen = root->fs_info->last_trans_committed; > logged_start = start; > @@ -4520,7 +4519,6 @@ static int btrfs_log_changed_extents(struct > btrfs_trans_handle *trans, > } > WARN_ON(!list_empty(&extents)); > write_unlock(&tree->lock); > - up_write(&inode->dio_sem); > > btrfs_release_path(path); > if (!ret) > -- > 2.14.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Filipe David Manana, “Whether you think you can, or you think you can't — you're right.” -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html