Re: [PATCH 1/2] generic: add a test for device removal with dirty data

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On 2023-07-24 21:52:23, Christoph Hellwig wrote:
> On Mon, Jul 24, 2023 at 08:23:26PM +0200, Andrey Albershteyn wrote:
> > > +# open a file descriptor for reading the file
> > > +exec 3< $SCSI_DEBUG_MNT/testfile
> > > +
> > > +# delete the scsi debug device while it still has dirty data
> > > +echo 1 > /sys/block/$(_short_dev $SCSI_DEBUG_DEV)/device/delete
> > > +
> > > +# try to read from the file, which should give us -EIO
> > > +cat <&3 > /dev/null
> > 
> > hmm, maybe I missing something but won't cat always return -EIO
> > here? I suppose the test will also pass without the behaviour you
> > introduced.
> 
> What do you mean with always? 

oh sorry, not always, I was thinking about xfs and it seems to go
into shutdown in log i/o processing.

> If the file system isn't shut down
> the read could succeed, and it could return a different error.
> Right now btrfs for example will not return -EIO here.
> 

I see, thanks.

-- 
- Andrey




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux