| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH, RFC] mkfs: get sector size from host fs dev when mkfs'ing file |
| From: | Eric Sandeen <sandeen@xxxxxxxxxx> |
| Date: | Mon, 14 Dec 2015 09:35:54 -0600 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20151214012712.GL26718@dastard> |
| References: | <5660CD5E.2040209@xxxxxxxxxx> <20151214012712.GL26718@dastard> |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 12/13/15 7:27 PM, Dave Chinner wrote:
...
> So the current behaviour is to use the underlying filesystem
> sector size, but we might have a 4k fs sector on a 512 physical
> sector device, and you want to detect this, right? The logical
> sector size is exposed by the filesystem in the XFS_IOC_DIOINFO
> information. i.e:
>
> case XFS_IOC_DIOINFO: {
> struct dioattr da;
> xfs_buftarg_t *target =
> XFS_IS_REALTIME_INODE(ip) ?
> mp->m_rtdev_targp : mp->m_ddev_targp;
>
> da.d_mem = da.d_miniosz = target->bt_logical_sectorsize;
> da.d_maxiosz = INT_MAX & ~(da.d_miniosz - 1);
>
> if (copy_to_user(arg, &da, sizeof(da)))
> return -EFAULT;
> return 0;
> }
>
> Isn't this exactly what XFS_IOC_DIOINFO is for?
Oh, right. SO MANY INTERFACES. ;)
But sure, that makes more sense, thanks for the reminder.
-Eric
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: oss.sgi.com - maintenance downtime Monday 14 Dec 2015 at 10:00 CT USA, Troy McCorkell |
|---|---|
| Next by Date: | Re: oss.sgi.com - maintenance downtime Monday 14 Dec 2015 at 10:00 CT USA, Troy McCorkell |
| Previous by Thread: | Re: [PATCH, RFC] mkfs: get sector size from host fs dev when mkfs'ing file, Dave Chinner |
| Next by Thread: | [PATCH V2] mkfs: get sector size from host fs d_miniosz when mkfs'ing file, Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |