[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR04MB6575E77BB149D632050324A2FC919@DM6PR04MB6575.namprd04.prod.outlook.com>
Date: Mon, 8 Nov 2021 18:00:36 +0000
From: Avri Altman <Avri.Altman@....com>
To: Bart Van Assche <bvanassche@....org>,
"James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Adrian Hunter <adrian.hunter@...el.com>
Subject: RE: [PATCH 2/2] scsi: ufs: Return a bsg request immediatley if
eh-in-progress
> 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.
Powered by blists - more mailing lists