Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] Btrfs: remove no longer used 'sync' member from transaction handle
@ 2019-03-11 13:10 fdmanana
  2019-03-11 13:13 ` Nikolay Borisov
  2019-03-11 14:38 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: fdmanana @ 2019-03-11 13:10 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Commit db2462a6ad3d ("btrfs: don't run delayed refs in the end transaction
logic") removed its last use, so now it does absolutely nothing, therefore
remove it.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/extent-tree.c | 6 ------
 fs/btrfs/file.c        | 1 -
 fs/btrfs/transaction.h | 1 -
 3 files changed, 8 deletions(-)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 994f0cc41799..bda83087271f 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2910,12 +2910,6 @@ static void delayed_ref_async_start(struct btrfs_work *work)
 		goto done;
 	}
 
-	/*
-	 * trans->sync means that when we call end_transaction, we won't
-	 * wait on delayed refs
-	 */
-	trans->sync = true;
-
 	/* Don't bother flushing if we got into a different transaction */
 	if (trans->transid > async->transid)
 		goto end;
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 34fe8a58b0e9..94c1c86fd18a 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2165,7 +2165,6 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
 		inode_unlock(inode);
 		goto out;
 	}
-	trans->sync = true;
 
 	ret = btrfs_log_dentry_safe(trans, dentry, start, end, &ctx);
 	if (ret < 0) {
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index f1ba78949d1b..b34678e7968e 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -120,7 +120,6 @@ struct btrfs_trans_handle {
 	bool allocating_chunk;
 	bool can_flush_pending_bgs;
 	bool reloc_reserved;
-	bool sync;
 	bool dirty;
 	struct btrfs_root *root;
 	struct btrfs_fs_info *fs_info;
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Btrfs: remove no longer used 'sync' member from transaction handle
  2019-03-11 13:10 [PATCH] Btrfs: remove no longer used 'sync' member from transaction handle fdmanana
@ 2019-03-11 13:13 ` Nikolay Borisov
  2019-03-11 14:38 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Borisov @ 2019-03-11 13:13 UTC (permalink / raw)
  To: fdmanana, linux-btrfs



On 11.03.19 г. 15:10 ч., fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> Commit db2462a6ad3d ("btrfs: don't run delayed refs in the end transaction
> logic") removed its last use, so now it does absolutely nothing, therefore
> remove it.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

> ---
>  fs/btrfs/extent-tree.c | 6 ------
>  fs/btrfs/file.c        | 1 -
>  fs/btrfs/transaction.h | 1 -
>  3 files changed, 8 deletions(-)
> 
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 994f0cc41799..bda83087271f 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -2910,12 +2910,6 @@ static void delayed_ref_async_start(struct btrfs_work *work)
>  		goto done;
>  	}
>  
> -	/*
> -	 * trans->sync means that when we call end_transaction, we won't
> -	 * wait on delayed refs
> -	 */
> -	trans->sync = true;
> -
>  	/* Don't bother flushing if we got into a different transaction */
>  	if (trans->transid > async->transid)
>  		goto end;
> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> index 34fe8a58b0e9..94c1c86fd18a 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -2165,7 +2165,6 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
>  		inode_unlock(inode);
>  		goto out;
>  	}
> -	trans->sync = true;
>  
>  	ret = btrfs_log_dentry_safe(trans, dentry, start, end, &ctx);
>  	if (ret < 0) {
> diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
> index f1ba78949d1b..b34678e7968e 100644
> --- a/fs/btrfs/transaction.h
> +++ b/fs/btrfs/transaction.h
> @@ -120,7 +120,6 @@ struct btrfs_trans_handle {
>  	bool allocating_chunk;
>  	bool can_flush_pending_bgs;
>  	bool reloc_reserved;
> -	bool sync;
>  	bool dirty;
>  	struct btrfs_root *root;
>  	struct btrfs_fs_info *fs_info;
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Btrfs: remove no longer used 'sync' member from transaction handle
  2019-03-11 13:10 [PATCH] Btrfs: remove no longer used 'sync' member from transaction handle fdmanana
  2019-03-11 13:13 ` Nikolay Borisov
@ 2019-03-11 14:38 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2019-03-11 14:38 UTC (permalink / raw)
  To: fdmanana; +Cc: linux-btrfs

On Mon, Mar 11, 2019 at 01:10:56PM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> Commit db2462a6ad3d ("btrfs: don't run delayed refs in the end transaction
> logic") removed its last use, so now it does absolutely nothing, therefore
> remove it.
> 
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Added to misc-5.2, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-11 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-11 13:10 [PATCH] Btrfs: remove no longer used 'sync' member from transaction handle fdmanana
2019-03-11 13:13 ` Nikolay Borisov
2019-03-11 14:38 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox