Re: [PATCH 5/5] scsi: st: factor out the end-of-medium completion test
From: Bart Van Assche
Date: Thu Nov 05 2026 - 12:50:20 EST
On 11/5/26 3:33 AM, shao.mingyin@xxxxxxxxxx wrote:
> The same six-condition EOM test appears twice, once when deciding that
> a write-behind finished early and once for the WRITE FILEMARKS path.
The first occurrence is in st_flush_write_buffer(). That function
submits a synchronous WRITE(6) command and has nothing to do with
write-behind. Additionally, I count five conditions instead of six.
Please fix the patch description.
> +static bool st_eom_ok(struct st_cmdstatus *cmdstatp)
Please declare the argument const and please choose a more descriptive
name, e.g. st_all_written_at_eom(). The "All written at EOM early
warning" comment from st_flush_write_buffer() could be moved above this
function.
Thanks,
Bart.