xfs
[Top] [All Lists]

Re: [PATCH v3] xfsprogs: blkid is now mandatory

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: [PATCH v3] xfsprogs: blkid is now mandatory
From: Jan Tulak <jtulak@xxxxxxxxxx>
Date: Thu, 6 Aug 2015 09:13:15 -0400 (EDT)
Cc: Eric Sandeen <sandeen@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <55C0E73B.1000904@xxxxxxxxxxx>
References: <1156743222.24471614.1436281858017.JavaMail.zimbra@xxxxxxxxxx> <1436346893-11831-1-git-send-email-jtulak@xxxxxxxxxx> <1508777144.956841.1437482376774.JavaMail.zimbra@xxxxxxxxxx> <20150726162530.GE29329@xxxxxxxxxxxxx> <1326157887.2004059.1438598404429.JavaMail.zimbra@xxxxxxxxxx> <55BFA2C5.20408@xxxxxxxxxx> <1050814645.2742881.1438702230663.JavaMail.zimbra@xxxxxxxxxx> <55C0E73B.1000904@xxxxxxxxxxx>
Thread-index: 1auRDOxazJRNXnDlRDhyDwMTnN+M0A==
Thread-topic: xfsprogs: blkid is now mandatory

----- Original Message -----
> From: "Eric Sandeen" <sandeen@xxxxxxxxxxx>
> > Signature detection (if I understand you correctly 'signature of existing
> > FS') could be really disabled, I think. That would take care of
> > check_overwrite(). However, blkid is also used in get_topology. That one
> > calls blkid_get_topology, which uses blkid's functions for finding out
> > sector and io sizes.
> 
> Well, it would be sane to default to 512 sectors; if that fails it'll
> be obvious fairly quickly, and the user can always use the command line
> to specify 4k sectors (or stripe alignment, etc) manually.
> 
> > What I really can do is to say "on osx, you can mkfs only files," and cut
> 
> bleah!  ;)
> 
> > out the blkid parts. But it limits the usage on OS X even further.
> > Although, the removed code for non-blkid systems used platform_findsizes
> > as fallback. Are there some ugly, terrible monsters who would jump from
> > under the bed when doing that?
> 
> Well, the old findsizes was there for this reason, but now it's gone ;)

platform_findsizes is still there, in the "is file" branch. Small ifdef can
put it instead of blkid...

> 
> > However, this patch affects only mkfs. It still should be possible to use
> > xfs_db and xfs_repair even on block devices.
> 
> I don't know how invasive it'd be, but I think in the absence of blkid,
> we should still work, but lose signature detection, and fall back to geometry
> defaults.

It looks like it works. Though I need to do some testing before I send the 
patch.
Unfortunately, making FS tests without the ability to mount it on the machine 
requires USB drive shuffling and it is hard to automate it... :-)

What I think about is whether to write some warning in autoconf. Because it is
easy to forget to install libblkid-dev package on linux and with this patch,
it chancan change the behaviour unexpectedly when using autoconf for blkid 
detection.

Or maybe I could require blkid by default, and disable it with an argument
like LOCAL_CONFIGURE_OPTIONS="--enable-blkid=no". 

I think the config option is a better way - it can't happen you disable it just 
because you forget to install a package.

Cheers,
Jan


-- 
Jan Tulak
jtulak@xxxxxxxxxx

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