On Mon 21-10-19 18:29:59, Theodore Y. Ts'o wrote: > On Fri, Oct 04, 2019 at 12:06:06AM +0200, Jan Kara wrote: > > Make checking of available credits in jbd2_journal_dirty_metadata() more > > strict. There should be always enough credits in the handle to write all > > potential revoke descriptors. Also we warn in case there are not enough > > credits since this is a bug in the filesystem. > > > > Signed-off-by: Jan Kara <jack@xxxxxxx> > > This is fine, but I wonder if we should also be returning an error in > jbd2_journal_revoke() --- of course, one problem is ext4_forget() is > getting called from ext4_free_blocks(), which currently doesn't return > an error. But we can capture the error return in __ext4_forget(), and > at that point we can give a much more useful error message, since we > can print the function caller and line number. Yeah, that's a good point. I'll add a sanity check to jbd2_journal_revoke() and then generate some error message in ext4. > Feel free to add: > > Reviewed-by: Theodore Ts'o <tytso@xxxxxxx> Thanks! Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR