diff mbox series

[04/40] btrfs: simplify btree_submit_bio_start and btrfs_submit_bio_start parameters

Message ID 5f4b7a11669006529515316bececcddbdf513534.1667331828.git.dsterba@suse.com (mailing list archive)
State New, archived
Headers show
Series Parameter and type changes to btrfs_inode | expand

Commit Message

David Sterba Nov. 1, 2022, 8:11 p.m. UTC
After previous patches the unused parameters can be removed from
btree_submit_bio_start and btrfs_submit_bio_start as they don't need to
conform to the extent_submit_bio_start_t typedef.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/btrfs_inode.h |  3 +--
 fs/btrfs/disk-io.c     | 11 +++--------
 fs/btrfs/disk-io.h     |  3 +--
 fs/btrfs/inode.c       |  3 +--
 4 files changed, 6 insertions(+), 14 deletions(-)

Comments

Anand Jain Nov. 2, 2022, 12:12 a.m. UTC | #1
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 962e39b4f7cb..2a61b610e02b 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -2550,8 +2550,7 @@ void btrfs_clear_delalloc_extent(struct inode *vfs_inode,
>    * At IO completion time the cums attached on the ordered extent record
>    * are inserted into the btree
>    */
> -blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio,
> -				    u64 dio_file_offset)

> +blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio);
  Remove the semicolon at the end of the function declaration.

>   {
>   	return btrfs_csum_one_bio(BTRFS_I(inode), bio, (u64)-1, false);
>   }
David Sterba Nov. 3, 2022, 1:28 p.m. UTC | #2
On Wed, Nov 02, 2022 at 08:12:06AM +0800, Anand Jain wrote:
> > diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> > index 962e39b4f7cb..2a61b610e02b 100644
> > --- a/fs/btrfs/inode.c
> > +++ b/fs/btrfs/inode.c
> > @@ -2550,8 +2550,7 @@ void btrfs_clear_delalloc_extent(struct inode *vfs_inode,
> >    * At IO completion time the cums attached on the ordered extent record
> >    * are inserted into the btree
> >    */
> > -blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio,
> > -				    u64 dio_file_offset)
> 
> > +blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio);
>   Remove the semicolon at the end of the function declaration.

Right, thanks. It gets removed in the next patch so the whole series
compiles, I don't think it needs to be resent.
Anand Jain Nov. 3, 2022, 2:34 p.m. UTC | #3
On 03/11/2022 21:28, David Sterba wrote:
> On Wed, Nov 02, 2022 at 08:12:06AM +0800, Anand Jain wrote:
>>> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
>>> index 962e39b4f7cb..2a61b610e02b 100644
>>> --- a/fs/btrfs/inode.c
>>> +++ b/fs/btrfs/inode.c
>>> @@ -2550,8 +2550,7 @@ void btrfs_clear_delalloc_extent(struct inode *vfs_inode,
>>>     * At IO completion time the cums attached on the ordered extent record
>>>     * are inserted into the btree
>>>     */
>>> -blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio,
>>> -				    u64 dio_file_offset)
>>
>>> +blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio);
>>    Remove the semicolon at the end of the function declaration.
> 
> Right, thanks. It gets removed in the next patch so the whole series
> compiles,


> I don't think it needs to be resent.

  Yes, of course, no resend is required. I am fine.
diff mbox series

Patch

diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 72cf235b7beb..54bf002e0013 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -415,8 +415,7 @@  void btrfs_submit_data_write_bio(struct inode *inode, struct bio *bio, int mirro
 void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio,
 			int mirror_num, enum btrfs_compression_type compress_type);
 void btrfs_submit_dio_repair_bio(struct inode *inode, struct bio *bio, int mirror_num);
-blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio,
-				    u64 dio_file_offset);
+blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio);
 blk_status_t btrfs_submit_bio_start_direct_io(struct inode *inode,
 					      struct bio *bio,
 					      u64 dio_file_offset);
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index f2d5677a9e6f..6ae9d63036ce 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -639,18 +639,14 @@  static void run_one_async_start(struct btrfs_work *work)
 	async = container_of(work, struct  async_submit_bio, work);
 	switch (async->submit_cmd) {
 	case WQ_SUBMIT_METADATA:
-		ret = btree_submit_bio_start(async->inode, async->bio,
-					     async->dio_file_offset);
+		ret = btree_submit_bio_start(async->bio);
 		break;
 	case WQ_SUBMIT_DATA:
-		ret = btrfs_submit_bio_start(async->inode, async->bio,
-					     async->dio_file_offset);
-
+		ret = btrfs_submit_bio_start(async->inode, async->bio);
 		break;
 	case WQ_SUBMIT_DATA_DIO:
 		ret = btrfs_submit_bio_start_direct_io(async->inode, async->bio,
 						       async->dio_file_offset);
-
 		break;
 	}
 	if (ret)
@@ -749,8 +745,7 @@  static blk_status_t btree_csum_one_bio(struct bio *bio)
 	return errno_to_blk_status(ret);
 }
 
-blk_status_t btree_submit_bio_start(struct inode *inode, struct bio *bio,
-				    u64 dio_file_offset)
+blk_status_t btree_submit_bio_start(struct bio *bio)
 {
 	/*
 	 * when we're called for a write, we're already in the async
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h
index 5998b2589830..d5b25fa8037b 100644
--- a/fs/btrfs/disk-io.h
+++ b/fs/btrfs/disk-io.h
@@ -122,8 +122,7 @@  enum btrfs_wq_submit_cmd {
 
 bool btrfs_wq_submit_bio(struct inode *inode, struct bio *bio, int mirror_num,
 			 u64 dio_file_offset, enum btrfs_wq_submit_cmd cmd);
-blk_status_t btree_submit_bio_start(struct inode *inode, struct bio *bio,
-				    u64 dio_file_offset);
+blk_status_t btree_submit_bio_start(struct bio *bio);
 int btrfs_alloc_log_tree_node(struct btrfs_trans_handle *trans,
 			      struct btrfs_root *root);
 int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans,
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 962e39b4f7cb..2a61b610e02b 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2550,8 +2550,7 @@  void btrfs_clear_delalloc_extent(struct inode *vfs_inode,
  * At IO completion time the cums attached on the ordered extent record
  * are inserted into the btree
  */
-blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio,
-				    u64 dio_file_offset)
+blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio);
 {
 	return btrfs_csum_one_bio(BTRFS_I(inode), bio, (u64)-1, false);
 }