Thread (4 messages) 4 messages, 3 authors, 2020-10-27

Re: [RFC] Removing b_end_io

From: Matthew Wilcox <willy@infradead.org>
Date: 2020-10-25 18:58:57
Also in: linux-fsdevel, lkml

On Sun, Oct 25, 2020 at 11:56:52AM -0400, Theodore Y. Ts'o wrote:
On Sun, Oct 25, 2020 at 04:44:38AM +0000, Matthew Wilcox wrote:
quoted
@@ -3068,6 +3069,12 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
 	}
 
 	submit_bio(bio);
+}
+
+static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
+			 enum rw_hint write_hint, struct writeback_control *wbc)
+{
+	__bh_submit(bh, op | op_flags, write_hint, wbc, end_bio_bh_io_sync);
 	return 0;
 }
I believe this will break use cases where the file system sets
bh->b_end_io and then calls submit_bh(), which then calls
submit_bh_wbc().  That's because with this change, calls to
submit_bh_wbc() --- include submit_bh() --- ignores bh->b_end_io and
results in end_bio_bh_io_sync getting used.
I think you're confused between the two end_ios.  The final argument
to bh_submit() and __bh_submit() is a bio_end_io_t.  end_bio_bh_io_sync()
calls bh->b_end_io.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help