From: Andrei Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>,
jack@suse.cz, marcosfrm@outlook.com
Subject: Re: GRUB does not work when sb_meta_uuid is set on XFSv5
Date: Sun, 10 Jul 2016 12:46:43 +0300 [thread overview]
Message-ID: <57821983.1070907@gmail.com> (raw)
In-Reply-To: <578009E2.3040606@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 945 bytes --]
08.07.2016 23:15, Andrei Borzenkov пишет:
> 06.07.2016 14:36, Marcos Mello пишет:
>> Background:
>>
>> Kernel 4.3
>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce748eaa65f2e9392ba82726503c8d994ffd6393
>>
>> xfsprogs 4.2.0
>> http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/cmds/xfsprogs.git;a=commit;h=9c4e12fb60c15dc9c5e54041c9679454b42cb23e
>>
>> I am using Xubuntu 16.04, which has 2.02-beta2 plus XFSv5 patches (1570140,
>> a139188, d3ffeb9, b6e80c7, ff3c200, 049dcfa) backported.
>>
>> grub-install verbose output before "xfs_admin -U generate <dev>":
>>
>
> This is due to XFS_SB_FEAT_INCOMPAT_META_UUID bit set. Jan, is it enough
> to add this bit to XFS_SB_FEAT_INCOMPAT_SUPPORTED or we need extra code
> to support it?
>
>
As far as I can tell we do not need any extra support (until we start
actually check metadata UUID).
@Marcos could you test this patch? Works for me.
@Jan any comment?
[-- Attachment #2: xfs-meta_uuid.patch --]
[-- Type: text/x-patch, Size: 1300 bytes --]
From: Andrei Borzenkov <arvidjaar@gmail.com>
Subject: [PATCH] xfs: accept filesystem with meta_uuid
XFS V5 stores UUID in metadata and compares them with superblock UUID.
To allow changing of user-visible UUID it stores original value in new
superblock field (meta_uuid) and sets incompatible flag to indicate that
new field must be used to verify metadata. Our driver currently does not
check metadata UUID so simply accept such filesystem.
---
grub-core/fs/xfs.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
index ca9c0c3..9f66dd6 100644
--- a/grub-core/fs/xfs.c
+++ b/grub-core/fs/xfs.c
@@ -76,8 +76,13 @@ GRUB_MOD_LICENSE ("GPLv3+");
/* incompat feature flags */
#define XFS_SB_FEAT_INCOMPAT_FTYPE (1 << 0) /* filetype in dirent */
+#define XFS_SB_FEAT_INCOMPAT_SPINODES (1 << 1) /* sparse inode chunks */
+#define XFS_SB_FEAT_INCOMPAT_META_UUID (1 << 2) /* metadata UUID */
+
+/* We do not currently verify metadata UUID so it is safe to read such filesystem */
#define XFS_SB_FEAT_INCOMPAT_SUPPORTED \
- (XFS_SB_FEAT_INCOMPAT_FTYPE)
+ (XFS_SB_FEAT_INCOMPAT_FTYPE | \
+ XFS_SB_FEAT_INCOMPAT_META_UUID)
struct grub_xfs_sblock
{
--
tg: (b524fa2..) u/xfs-meta_uuid (depends on: master)
next prev parent reply other threads:[~2016-07-10 9:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 11:36 GRUB does not work when sb_meta_uuid is set on XFSv5 Marcos Mello
2016-07-06 12:02 ` Andrei Borzenkov
2016-07-06 12:36 ` Marcos Mello
2016-07-08 20:15 ` Andrei Borzenkov
2016-07-10 9:46 ` Andrei Borzenkov [this message]
2016-07-10 19:15 ` Marcos Mello
2016-07-11 4:32 ` Andrei Borzenkov
2016-07-11 9:53 ` Marcos Mello
2016-07-11 12:04 ` Jan Kara
2016-07-26 17:30 ` Andrei Borzenkov
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=57821983.1070907@gmail.com \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
--cc=jack@suse.cz \
--cc=marcosfrm@outlook.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.