From: Eric Sandeen <sandeen@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH, RFC] mkfs: get sector size from host fs dev when mkfs'ing file
Date: Mon, 14 Dec 2015 09:35:54 -0600 [thread overview]
Message-ID: <566EE1DA.9090404@redhat.com> (raw)
In-Reply-To: <20151214012712.GL26718@dastard>
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-12-14 15:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 23:16 [PATCH, RFC] mkfs: get sector size from host fs dev when mkfs'ing file Eric Sandeen
2015-12-14 1:27 ` Dave Chinner
2015-12-14 15:35 ` Eric Sandeen [this message]
2015-12-14 17:16 ` [PATCH V2] mkfs: get sector size from host fs d_miniosz " Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=566EE1DA.9090404@redhat.com \
--to=sandeen@redhat.com \
--cc=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox