[Top] [All Lists]

Re: [PATCH RFC] xfs: set block device logical sector size on xfs_buftarg

To: Ric Wheeler <rwheeler@xxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH RFC] xfs: set block device logical sector size on xfs_buftarg
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Fri, 22 Nov 2013 08:57:06 -0600
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <528F66A4.7060200@xxxxxxxxxx>
References: <5283C41D.7070503@xxxxxxxxxx> <20131113185645.GA20869@xxxxxxxxxxxxx> <5283CE2E.2070702@xxxxxxxxxxx> <20131113212658.GJ6188@dastard> <20131114133749.GA26268@xxxxxxxxxxxxx> <5284E484.6090001@xxxxxxxxxxx> <20131114210156.GP6188@dastard> <528F66A4.7060200@xxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.0
On 11/22/13, 8:13 AM, Ric Wheeler wrote:


> I think you do that by using SCSI debug to get a 4K sector drive -
> that is how we tested for RHEL6 for example. Layering on restrictions
> to hardware in the file system seems a bit harsh.
> The QEMU crowd will be working to get better support for 4K drives in
> the future, but I think that we are effectively going to cause a huge
> field issue here since these 512/4K drives are extremely common..
> Given the SCSI debug method for this, does that mean you retract your
> objections and will support Eric's patch :) ?

FWIW, my patch is a disaster, but I'll work on something along those
lines that's not a disaster, so we can discuss it properly.  ;)

To make this go, I think we need to add a structure member to the
xfs_buftarg which describes the logical sector size, and use that
to enforce minimum IO sizes.  The current sector size fields can
remain in place for the mkfs-specified, presumably physical sector

Then, since the sector sizes in the sb, mp, and buftarg have been
disassociated a bit, I'll need to audit things like the sub-block
zeroing paths so that we DTRT on a sub-block DIO.

At that point, the "sector size" semantics in the mkfs.xfs manpage
get a little weird; if we specify a sector size of 4k, how can
we do sub-sector IOs?

What the mkfs option really means at that point is that the specified
size is the minimum size and alignment which will be generated from
within the filesystem for metadata; we can make it clear that the
underlying logical sector size is still the constraint for userspace

I'm not quite sure what the XFS_IOC_DIOINFO ioctl should advertise,
at that point.

Anyway, that's about where I'm at in my brain with all this, will
try to get something that actually works relatively soon.


> Regards,
> Ric

<Prev in Thread] Current Thread [Next in Thread>