All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Bart Van Assche <bvanassche@acm.org>,
	Theodore Ts'o <tytso@mit.edu>
Subject: [PATCH 40/51] fs/ext4: Use the new blk_opf_t type
Date: Thu, 23 Jun 2022 11:05:17 -0700	[thread overview]
Message-ID: <20220623180528.3595304-41-bvanassche@acm.org> (raw)
In-Reply-To: <20220623180528.3595304-1-bvanassche@acm.org>

Improve static type checking by using the new blk_opf_t type for
variables that represent request flags.

Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 fs/ext4/ext4.h        |  8 ++++----
 fs/ext4/fast_commit.c |  2 +-
 fs/ext4/super.c       | 14 +++++++-------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 75b8d81b2469..29fc575a4eb6 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -3058,14 +3058,14 @@ extern unsigned int ext4_list_backups(struct super_block *sb,
 
 /* super.c */
 extern struct buffer_head *ext4_sb_bread(struct super_block *sb,
-					 sector_t block, int op_flags);
+					 sector_t block, blk_opf_t op_flags);
 extern struct buffer_head *ext4_sb_bread_unmovable(struct super_block *sb,
 						   sector_t block);
-extern void ext4_read_bh_nowait(struct buffer_head *bh, int op_flags,
+extern void ext4_read_bh_nowait(struct buffer_head *bh, blk_opf_t op_flags,
 				bh_end_io_t *end_io);
-extern int ext4_read_bh(struct buffer_head *bh, int op_flags,
+extern int ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags,
 			bh_end_io_t *end_io);
-extern int ext4_read_bh_lock(struct buffer_head *bh, int op_flags, bool wait);
+extern int ext4_read_bh_lock(struct buffer_head *bh, blk_opf_t op_flags, bool wait);
 extern void ext4_sb_breadahead_unmovable(struct super_block *sb, sector_t block);
 extern int ext4_seq_options_show(struct seq_file *seq, void *offset);
 extern int ext4_calculate_overhead(struct super_block *sb);
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
index 795a60ad1897..de6c73d0f431 100644
--- a/fs/ext4/fast_commit.c
+++ b/fs/ext4/fast_commit.c
@@ -658,7 +658,7 @@ void ext4_fc_track_range(handle_t *handle, struct inode *inode, ext4_lblk_t star
 
 static void ext4_fc_submit_bh(struct super_block *sb, bool is_tail)
 {
-	int write_flags = REQ_SYNC;
+	blk_opf_t write_flags = REQ_SYNC;
 	struct buffer_head *bh = EXT4_SB(sb)->s_fc_bh;
 
 	/* Add REQ_FUA | REQ_PREFLUSH only its tail */
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 845f2f8aee5f..1d7f65088ddc 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -159,7 +159,7 @@ MODULE_ALIAS("ext3");
 #define IS_EXT3_SB(sb) ((sb)->s_bdev->bd_holder == &ext3_fs_type)
 
 
-static inline void __ext4_read_bh(struct buffer_head *bh, int op_flags,
+static inline void __ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags,
 				  bh_end_io_t *end_io)
 {
 	/*
@@ -174,7 +174,7 @@ static inline void __ext4_read_bh(struct buffer_head *bh, int op_flags,
 	submit_bh(REQ_OP_READ, op_flags, bh);
 }
 
-void ext4_read_bh_nowait(struct buffer_head *bh, int op_flags,
+void ext4_read_bh_nowait(struct buffer_head *bh, blk_opf_t op_flags,
 			 bh_end_io_t *end_io)
 {
 	BUG_ON(!buffer_locked(bh));
@@ -186,7 +186,7 @@ void ext4_read_bh_nowait(struct buffer_head *bh, int op_flags,
 	__ext4_read_bh(bh, op_flags, end_io);
 }
 
-int ext4_read_bh(struct buffer_head *bh, int op_flags, bh_end_io_t *end_io)
+int ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags, bh_end_io_t *end_io)
 {
 	BUG_ON(!buffer_locked(bh));
 
@@ -203,7 +203,7 @@ int ext4_read_bh(struct buffer_head *bh, int op_flags, bh_end_io_t *end_io)
 	return -EIO;
 }
 
-int ext4_read_bh_lock(struct buffer_head *bh, int op_flags, bool wait)
+int ext4_read_bh_lock(struct buffer_head *bh, blk_opf_t op_flags, bool wait)
 {
 	if (trylock_buffer(bh)) {
 		if (wait)
@@ -227,8 +227,8 @@ int ext4_read_bh_lock(struct buffer_head *bh, int op_flags, bool wait)
  * return.
  */
 static struct buffer_head *__ext4_sb_bread_gfp(struct super_block *sb,
-					       sector_t block, int op_flags,
-					       gfp_t gfp)
+					       sector_t block,
+					       blk_opf_t op_flags, gfp_t gfp)
 {
 	struct buffer_head *bh;
 	int ret;
@@ -248,7 +248,7 @@ static struct buffer_head *__ext4_sb_bread_gfp(struct super_block *sb,
 }
 
 struct buffer_head *ext4_sb_bread(struct super_block *sb, sector_t block,
-				   int op_flags)
+				   blk_opf_t op_flags)
 {
 	return __ext4_sb_bread_gfp(sb, block, op_flags, __GFP_MOVABLE);
 }

  parent reply	other threads:[~2022-06-23 19:01 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 18:04 [PATCH 00/51] Improve static type checking for request flags Bart Van Assche
2022-06-23 18:04 ` [PATCH 01/51] treewide: Rename enum req_opf into enum req_op Bart Van Assche
2022-06-23 18:04 ` [PATCH 02/51] block: Use enum req_op where appropriate Bart Van Assche
2022-06-23 18:04 ` [PATCH 03/51] block: Change the type of the last .rw_page() argument Bart Van Assche
2022-06-23 18:04 ` [PATCH 04/51] block: Change the type of req_op() and bio_op() into enum req_op Bart Van Assche
2022-06-23 18:04 ` [PATCH 05/51] block: Introduce the type blk_opf_t Bart Van Assche
2022-06-23 18:04 ` [PATCH 06/51] block: Use the new blk_opf_t type Bart Van Assche
2022-06-23 18:04 ` [PATCH 07/51] blktrace: " Bart Van Assche
2022-06-23 18:04 ` [PATCH 08/51] blktrace: Trace remap operations correctly Bart Van Assche
2022-06-23 18:04 ` [PATCH 09/51] block/brd: Use the enum req_op type Bart Van Assche
2022-06-23 18:04 ` [PATCH 10/51] block/drbd: Use the enum req_op and blk_opf_t types Bart Van Assche
2022-06-24  5:00   ` Christoph Böhmwalder
2022-06-23 18:04 ` [PATCH 11/51] block/floppy: Fix a sparse warning Bart Van Assche
2022-06-23 18:04 ` [PATCH 12/51] block/null_blk: Fix sparse warnings in tracing code Bart Van Assche
2022-06-23 18:04 ` [PATCH 13/51] um: Use enum req_op where appropriate Bart Van Assche
2022-06-23 18:04 ` [PATCH 14/51] dm/core: Use the enum req_op and blk_opf_t types Bart Van Assche
2022-06-23 18:04 ` [PATCH 15/51] dm/bufio: Change 'int rw' into 'enum req_op op' Bart Van Assche
2022-06-23 18:04 ` [PATCH 16/51] dm/kcopyd: Rename kcopyd_job.rw into kcopyd_job.op Bart Van Assche
2022-06-23 18:04 ` [PATCH 17/51] dm/ebs: Change 'int rw' into 'enum req_op op' Bart Van Assche
2022-06-23 18:04 ` [PATCH 18/51] dm/dm-flakey: Use the new blk_opf_t type Bart Van Assche
2022-06-23 18:04 ` [PATCH 19/51] dm/dm-integrity: Use the enum req_op and blk_opf_t types Bart Van Assche
2022-06-23 18:04 ` [PATCH 20/51] dm/dm-snap: " Bart Van Assche
2022-06-23 18:04 ` [PATCH 21/51] dm/dm-zoned: Use the enum req_op type Bart Van Assche
2022-06-23 22:46   ` Damien Le Moal
2022-06-23 18:04 ` [PATCH 22/51] md/core: Use the enum req_op and blk_opf_t types Bart Van Assche
2022-06-23 18:05 ` [PATCH 23/51] md/bcache: " Bart Van Assche
2022-06-23 18:05 ` [PATCH 24/51] md/raid1: Use the new blk_opf_t type Bart Van Assche
2022-06-23 18:05 ` [PATCH 25/51] md/raid10: " Bart Van Assche
2022-06-23 18:05 ` [PATCH 26/51] md/raid5: Use the enum req_op and blk_opf_t types Bart Van Assche
2022-06-23 18:05 ` [PATCH 27/51] nvme/host: " Bart Van Assche
2022-06-26  9:25   ` Sagi Grimberg
2022-06-23 18:05 ` [PATCH 28/51] nvme/target: Use the new blk_opf_t type Bart Van Assche
2022-06-26  9:25   ` Sagi Grimberg
2022-06-23 18:05 ` [PATCH 29/51] scsi/core: Improve static type checking Bart Van Assche
2022-06-23 18:05 ` [PATCH 30/51] scsi/core: Change the return type of scsi_noretry_cmd() into bool Bart Van Assche
2022-06-23 18:05 ` [PATCH 31/51] scsi/core: Use the new blk_opf_t type Bart Van Assche
2022-06-23 18:05 ` [PATCH 32/51] scsi/device_handlers: " Bart Van Assche
2022-06-23 18:05 ` [PATCH 33/51] scsi/ufs: Rename a 'dir' argument into 'op' Bart Van Assche
2022-06-23 19:09   ` Avri Altman
2022-06-23 18:05 ` [PATCH 34/51] scsi/target: Use the new blk_opf_t type Bart Van Assche
2022-06-23 18:05 ` [PATCH 35/51] mm: " Bart Van Assche
2022-06-23 18:05 ` [PATCH 36/51] fs/buffer: " Bart Van Assche
2022-06-23 18:05 ` [PATCH 37/51] fs/direct-io: Use the enum req_op and blk_opf_t types Bart Van Assche
2022-06-23 18:05 ` [PATCH 38/51] fs/mpage: Use the new blk_opf_t type Bart Van Assche
2022-06-23 18:05 ` [PATCH 39/51] fs/btrfs: Use the enum req_op and blk_opf_t types Bart Van Assche
2022-06-23 18:05 ` Bart Van Assche [this message]
2022-06-23 18:05 ` [PATCH 41/51] fs/f2fs: " Bart Van Assche
2022-06-23 18:05 ` [PATCH 42/51] fs/gfs2: " Bart Van Assche
2022-06-23 18:05 ` [PATCH 43/51] fs/hfsplus: " Bart Van Assche
2022-06-23 18:05 ` [PATCH 44/51] fs/iomap: Use the new blk_opf_t type Bart Van Assche
2022-06-23 18:05 ` [PATCH 45/51] fs/jbd2: Fix the documentation of the jbd2_write_superblock() callers Bart Van Assche
2022-06-23 18:05 ` [PATCH 46/51] fs/nilfs: Use the enum req_op and blk_opf_t types Bart Van Assche
2022-06-24  3:43   ` Ryusuke Konishi
2022-06-25  0:02     ` Bart Van Assche
2022-06-25  0:55       ` Ryusuke Konishi
2022-06-23 18:05 ` [PATCH 47/51] fs/ntfs3: Use enum req_op where appropriate Bart Van Assche
2022-06-23 18:05 ` [PATCH 48/51] fs/ocfs2: Use the enum req_op and blk_opf_t types Bart Van Assche
2022-06-24  2:04   ` Joseph Qi
2022-06-23 18:05 ` [PATCH 49/51] PM: " Bart Van Assche
2022-06-27 13:04   ` Rafael J. Wysocki
2022-06-23 18:05 ` [PATCH 50/51] fs/xfs: " Bart Van Assche
2022-06-25  3:23   ` Darrick J. Wong
2022-06-23 18:05 ` [PATCH 51/51] fs/zonefs: Fix sparse warnings in tracing code Bart Van Assche
2022-06-23 22:48   ` Damien Le Moal
2022-06-23 23:19     ` Bart Van Assche
2022-06-24  0:03       ` Damien Le Moal
2022-06-24  4:56   ` Christoph Hellwig
2022-06-24 19:57     ` Bart Van Assche
2022-06-25  9:23       ` Christoph Hellwig
2022-06-26  0:44         ` Bart Van Assche
2022-06-26  9:58           ` Luc Van Oostenryck
2022-06-26 15:42             ` Bart Van Assche
2022-06-26 16:24               ` Luc Van Oostenryck
2022-06-26 16:33             ` Linus Torvalds
2022-06-26 16:50               ` Linus Torvalds
2022-06-26 20:10                 ` Luc Van Oostenryck
2022-06-26 19:44               ` Luc Van Oostenryck
2022-06-27 19:05               ` [PATCH 0/5] allow -1 and compares in bitwise types Luc Van Oostenryck
2022-06-27 19:05                 ` [PATCH 1/5] bitwise: add testcases Luc Van Oostenryck
2022-06-27 19:05                 ` [PATCH 2/5] bitwise: accept all ones as non-restricted value Luc Van Oostenryck
2022-06-27 23:32                   ` Ramsay Jones
2022-06-27 19:05                 ` [PATCH 3/5] bitwise: allow compares for bitwise types Luc Van Oostenryck
2022-06-27 19:20                   ` Linus Torvalds
2022-06-27 23:34                   ` Ramsay Jones
2022-06-27 19:05                 ` [PATCH 4/5] bitwise: do not remove the signedness of " Luc Van Oostenryck
2022-06-27 19:05                 ` [PATCH 5/5] bitwise: early expansion of simple constants Luc Van Oostenryck
2022-06-27 19:14                 ` [PATCH 0/5] allow -1 and compares in bitwise types Linus Torvalds
2022-06-27 19:15                 ` Bart Van Assche
2022-06-26 19:41         ` [PATCH 51/51] fs/zonefs: Fix sparse warnings in tracing code Steven Rostedt
2022-06-24  5:05 ` [PATCH 00/51] Improve static type checking for request flags Christoph Hellwig
2022-06-24  5:07   ` Christoph Hellwig
2022-06-28 23:10     ` Bart Van Assche
2022-06-28 22:44   ` Bart Van Assche

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=20220623180528.3595304-41-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.