mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurence Oberman <loberman@redhat.com>
To: shao.mingyin@zte.com.cn, bvanassche@acm.org, mkp@kernel.org,
	 linux-scsi@vger.kernel.org
Cc: James.Bottomley@HansenPartnership.com, alim.akhtar@samsung.com,
	 beanhuo@micron.com, stanleyjhu@google.com, jmeneghi@redhat.com,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] scsi: st: factor out the end-of-medium completion test
Date: Fri, 06 Nov 2026 08:42:12 -0500	[thread overview]
Message-ID: <e89f5d5656ef983e21e27a8557ddd178e108295d.camel@redhat.com> (raw)
In-Reply-To: <20261106154249447T0sEhKHXg8J8MF0Fo1Op0@zte.com.cn>

On Fri, 2026-11-06 at 15:42 +0800, shao.mingyin@zte.com.cn wrote:
> On 11/5/26 09:21, Bart Van Assche wrote:
> > 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.
> 
> You are right on both counts.  I will describe it as the synchronous
> WRITE(6) issued by st_flush_write_buffer() and drop the condition
> count.
> 
> > 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.
> 
> Will do: const struct st_cmdstatus *cmdstatp,
> st_all_written_at_eom(), and
> the comment moved above the helper.  v2 will follow.
> 
> Thanks,
> Shao

Hi,

Thanks for the patch.

The refactor looks correct, but I don't think it buys enough to justify
touching this code. The EOM handling in st is mature and subtle around
buffered writes and residuals, and having the condition inline at each
call site, with its comment, makes it clear what "success at EOM" means
in that context. A helper named st_eom_ok() hides that.

Unless this is a prerequisite for a functional fix, I'd prefer to leave
it as is.

NAK for now.

Regards,
Laurence


  reply	other threads:[~2026-11-06 13:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 11:33 [PATCH 0/5] scsi: remove dead code and redundant checks shao.mingyin
2026-11-05 11:33 ` [PATCH 1/5] scsi: ufs: drop the unreachable offset check shao.mingyin
2026-11-05 17:18   ` Bart Van Assche
2026-11-05 11:33 ` [PATCH 2/5] scsi: core: drop the dead VPD size check shao.mingyin
2026-11-05 17:18   ` Bart Van Assche
2026-11-05 11:33 ` [PATCH 3/5] scsi: sd: drop the dead nr_blocks store shao.mingyin
2026-11-05 11:33 ` [PATCH 4/5] scsi: sd: drop the dead -EOVERFLOW branches shao.mingyin
2026-11-05 17:20   ` Bart Van Assche
2026-11-06  7:42     ` shao.mingyin
2026-11-05 11:33 ` [PATCH 5/5] scsi: st: factor out the end-of-medium completion test shao.mingyin
2026-11-05 17:21   ` Bart Van Assche
2026-11-06  7:42     ` shao.mingyin
2026-11-06 13:42       ` Laurence Oberman [this message]
2026-11-06 14:21         ` shao.mingyin
2026-11-05 17:54 ` [PATCH 0/5] scsi: remove dead code and redundant checks Bart Van Assche
2026-11-06  7:42   ` shao.mingyin

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=e89f5d5656ef983e21e27a8557ddd178e108295d.camel@redhat.com \
    --to=loberman@redhat.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=jmeneghi@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=shao.mingyin@zte.com.cn \
    --cc=stanleyjhu@google.com \
    /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

all inboxes | Powered by JetHome®