LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Avri Altman <Avri.Altman@wdc.com> To: Bart Van Assche <bvanassche@acm.org>, "James E . J . Bottomley" <jejb@linux.vnet.ibm.com>, "Martin K . Petersen" <martin.petersen@oracle.com> Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Adrian Hunter <adrian.hunter@intel.com> Subject: RE: [PATCH 2/2] scsi: ufs: Return a bsg request immediatley if eh-in-progress Date: Mon, 8 Nov 2021 18:00:36 +0000 [thread overview] Message-ID: <DM6PR04MB6575E77BB149D632050324A2FC919@DM6PR04MB6575.namprd04.prod.outlook.com> (raw) In-Reply-To: <06c95606-ac89-5750-224f-04c72b5cc111@acm.org> > On 11/8/21 9:24 AM, Avri Altman wrote: > > I am not sure. I would expect a retry / polling / other, if any, to be > > done in user-space and not in the kernel. e.g. a common practice in > > the code that send SG_IO or other ioctls is to retry on EBUSY. Not > > sure that this is the case in ufs-utils though. > Shouldn't we aim to make sure that user space code does not have to use > busy waiting? I don't know. Waiting in the kernel seems like an unnecessary complication. If you find it useless, better to just drop it. I looked it up in ufs-utils public repository (https://github.com/westerndigitalcorporation/ufs-utils), and it looks like that: while (((ret = ioctl(fd, SG_IO, &io_hdr_v4)) < 0) && ((errno == EINTR) || (errno == EAGAIN))) ; Thanks, Avri > > Thanks, > > Bart.
prev parent reply other threads:[~2021-11-08 18:00 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-08 12:08 [PATCH 0/2] scsi: ufs: Block user-space access if eh-in-progress Avri Altman 2021-11-08 12:08 ` [PATCH 1/2] scsi: ufs: Inline eh-in-progress states Avri Altman 2021-11-08 12:08 ` [PATCH 2/2] scsi: ufs: Return a bsg request immediatley if eh-in-progress Avri Altman 2021-11-08 17:16 ` Bart Van Assche 2021-11-08 17:24 ` Avri Altman 2021-11-08 17:32 ` Bart Van Assche 2021-11-08 18:00 ` Avri Altman [this message]
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=DM6PR04MB6575E77BB149D632050324A2FC919@DM6PR04MB6575.namprd04.prod.outlook.com \ --to=avri.altman@wdc.com \ --cc=adrian.hunter@intel.com \ --cc=bvanassche@acm.org \ --cc=jejb@linux.vnet.ibm.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-scsi@vger.kernel.org \ --cc=martin.petersen@oracle.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: linkBe 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; as well as URLs for NNTP newsgroup(s).