linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Cc: Anand Jain <anand.jain@oracle.com>
Subject: [PATCH 3/4] btrfs: optimize variables size in btrfs_submit_compressed_write
Date: Sat, 29 May 2021 17:48:35 +0800	[thread overview]
Message-ID: <ee29e49041b7e6dae1f0d1d89d01c8a249001024.1622252933.git.anand.jain@oracle.com> (raw)
In-Reply-To: <cover.1622252932.git.anand.jain@oracle.com>

Patch (btrfs: reduce compressed_bio member's types) reduced some
member's size. Function arguments @len, @compressed_len and @nr_pages
can be declared as unsigned int.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/compression.c | 6 +++---
 fs/btrfs/compression.h | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index c1432a58f378..c523f384bd1a 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -385,10 +385,10 @@ static void end_compressed_bio_write(struct bio *bio)
  * the end io hooks.
  */
 blk_status_t btrfs_submit_compressed_write(struct btrfs_inode *inode, u64 start,
-				 unsigned long len, u64 disk_start,
-				 unsigned long compressed_len,
+				 unsigned int len, u64 disk_start,
+				 unsigned int compressed_len,
 				 struct page **compressed_pages,
-				 unsigned long nr_pages,
+				 unsigned int nr_pages,
 				 unsigned int write_flags,
 				 struct cgroup_subsys_state *blkcg_css)
 {
diff --git a/fs/btrfs/compression.h b/fs/btrfs/compression.h
index 00d8439048c9..c359f20920d0 100644
--- a/fs/btrfs/compression.h
+++ b/fs/btrfs/compression.h
@@ -91,10 +91,10 @@ int btrfs_decompress_buf2page(const char *buf, unsigned long buf_start,
 			      struct bio *bio);
 
 blk_status_t btrfs_submit_compressed_write(struct btrfs_inode *inode, u64 start,
-				  unsigned long len, u64 disk_start,
-				  unsigned long compressed_len,
+				  unsigned int len, u64 disk_start,
+				  unsigned int compressed_len,
 				  struct page **compressed_pages,
-				  unsigned long nr_pages,
+				  unsigned int nr_pages,
 				  unsigned int write_flags,
 				  struct cgroup_subsys_state *blkcg_css);
 blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
-- 
2.30.2


  parent reply	other threads:[~2021-05-29  9:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29  9:48 [PATCH 0/4] variables fixes in compression.c Anand Jain
2021-05-29  9:48 ` [PATCH 1/4] btrfs: reduce the variable size to fit nr_pages Anand Jain
2021-05-29  9:48 ` [PATCH 2/4] btrfs: optimize variables size in btrfs_submit_compressed_read Anand Jain
2021-05-29  9:48 ` Anand Jain [this message]
2021-05-29  9:48 ` [PATCH 4/4] btrfs: fix comment about max_out in btrfs_compress_pages Anand Jain
2021-05-31 18:37 ` [PATCH 0/4] variables fixes in compression.c David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee29e49041b7e6dae1f0d1d89d01c8a249001024.1622252933.git.anand.jain@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).