From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Christoph Hellwig <hch@infradead.org>,
Eric Sandeen <sandeen@redhat.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH V2] mkfs: handle 4k sector devices more cleanly
Date: Sat, 9 Jan 2010 09:43:28 -0500 [thread overview]
Message-ID: <20100109144327.GB9688@infradead.org> (raw)
In-Reply-To: <4B47E8C0.2040809@sandeen.net>
On Fri, Jan 08, 2010 at 08:24:00PM -0600, Eric Sandeen wrote:
> Christoph Hellwig wrote:
> > On Fri, Jan 08, 2010 at 10:46:41AM -0600, Eric Sandeen wrote:
> >> +extern void platform_findsizes (char *path, int fd, long long *sz, int *bsz);
> >
> > Can you move the prototype from libxfs/init.h to include/libxfs.h
> > instead of adding it to the .c file?
>
> actually it seems a little out of place in libxfs/init.h; that probably
> works but there are no other platform_* functions there...
>
> Should this be more like an xfs_findsizes in libxfs, which
> calls platform_findsizes internally just for consistency? *shrug*
I'd just move the header around to keep it simple for now.
> The only way this is used is: it's sent to libxfs_init and then from there
> only to libxfs_open which does:
>
> if (!readonly && setblksize && (statb.st_mode & S_IFMT) == S_IFBLK) {
> if (setblksize == 1)
> /* use the default blocksize */
> (void)platform_set_blocksize(fd, path, statb.st_rdev, XFS_MIN_SECTORSIZE, 0);
> else {
> /* given an explicit blocksize to use */
> if (platform_set_blocksize(fd, path, statb.st_rdev, setblksize, 1))
> exit(1);
> }
> }
>
> so "1" seems to have the special meaning of "use XFS_MIN_SECTORSIZE"
>
> Hm, ok but in my patch setblksize is 0, so it's not getting set.
> I suppose this -might- mess up other utils ...
Yes, now we do not set any size, while previously we always set
XFS_MIN_SECTORSIZE. I don't think this actually changes anything - the
kernel doesn't make use of this blocksize information outside of
filesystems, and we already reset it on mount.
> > Maye we should just do the xi.setblksize = sectorsize unconditionally?
>
> I think that's best. It's already defaulted to XFS_MIN_SECTORSIZE
> so should be no functional change if it doesn't get otherwise set - although
> I think it -does- get set in all cases now - either from ft.sectoralign/blocksize,
> from the explicit -s setting, or the ft.sectorsize by default.
>
> What do you think about removing the "1" magic if so? At that point I think
> nothing relies on it.
repair uses it in a weird way.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-01-09 14:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 18:25 [PATCH] mkfs: handle 4k sector devices more cleanly Eric Sandeen
2009-12-10 22:40 ` Christoph Hellwig
2009-12-10 23:00 ` Eric Sandeen
2010-01-08 16:46 ` [PATCH V2] " Eric Sandeen
2010-01-08 17:44 ` Christoph Hellwig
2010-01-08 17:51 ` Eric Sandeen
2010-01-09 2:24 ` Eric Sandeen
2010-01-09 14:43 ` Christoph Hellwig [this message]
2010-01-11 18:10 ` [PATCH V3] " Eric Sandeen
2010-01-11 21:36 ` Christoph Hellwig
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=20100109144327.GB9688@infradead.org \
--to=hch@infradead.org \
--cc=sandeen@redhat.com \
--cc=sandeen@sandeen.net \
--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