[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240402130446.GA2496428@fedora>
Date: Tue, 2 Apr 2024 09:04:46 -0400
From: Stefan Hajnoczi <stefanha@...hat.com>
To: Christoph Hellwig <hch@....de>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
eblake@...hat.com, Alasdair Kergon <agk@...hat.com>,
Mikulas Patocka <mpatocka@...hat.com>, dm-devel@...ts.linux.dev,
David Teigland <teigland@...hat.com>,
Mike Snitzer <snitzer@...nel.org>, Jens Axboe <axboe@...nel.dk>,
Joe Thornber <ejt@...hat.com>
Subject: Re: [RFC 0/9] block: add llseek(SEEK_HOLE/SEEK_DATA) support
On Tue, Apr 02, 2024 at 02:26:17PM +0200, Christoph Hellwig wrote:
> On Thu, Mar 28, 2024 at 04:39:01PM -0400, Stefan Hajnoczi wrote:
> > In the block device world there are similar concepts to holes:
> > - SCSI has Logical Block Provisioning where the "mapped" state would be
> > considered data and other states would be considered holes.
>
> But for SCSI (and ATA and NVMe) unmapped/delallocated/etc blocks do
> not have to return zeroes. They could also return some other
> initialization pattern pattern. So they are (unfortunately) not a 1:1
> mapping to holes in sparse files.
Hi Christoph,
There is a 1:1 mapping when when the Logical Block Provisioning Read
Zeroes (LBPRZ) field is set to xx1b in the Logical Block Provisioning
VPD page.
Otherwise SEEK_HOLE/SEEK_DATA has to treat the device as filled with
data because it doesn't know where the holes are.
Stefan
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists