From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1bMBK8-0002dZ-Un for mharc-grub-devel@gnu.org; Sun, 10 Jul 2016 05:46:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMBK6-0002dP-Q8 for grub-devel@gnu.org; Sun, 10 Jul 2016 05:46:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMBK2-0000E2-MF for grub-devel@gnu.org; Sun, 10 Jul 2016 05:46:49 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:33149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMBK2-0000Du-EA for grub-devel@gnu.org; Sun, 10 Jul 2016 05:46:46 -0400 Received: by mail-lf0-x242.google.com with SMTP id f93so81288lfi.0 for ; Sun, 10 Jul 2016 02:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=kZiHEYCB22fLI3SAsxvXBKeNnBMuv4KUVycu21JUw3o=; b=HJ6NMqVRQZx2YaJSDmlZD1s7uQjH5gBW+o60xph1tCOBZ70b/v/LVFv5eWM7WHEdXu EYA7hiHoqwYtZR3SoUeVmZEVtjl/HRkIUy4md9FDhdJ1hzXvqwjvc64CBfYmxovJQrti BvowbXJAy/JBRLq3hx+0Y4laCNiUxZ3tH8flfde5VFPA98FZmbUffWL260d+nMv+yftD Xll+AdWQdDeAQkCEw/JMoZNyOIJITmwjiYYLcsY7p0F3UdQMXdJOhaZxGxrH3ELb9g7S gST/tC0fFvMTnMIMetVqtejW+JFurUy0H2rAEsAHxEBlEZLc4dKu9lm9lIoH3o3mhtv9 4DFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=kZiHEYCB22fLI3SAsxvXBKeNnBMuv4KUVycu21JUw3o=; b=D7djFlQutvHl+6MQk5jfLy3lvu2oEaEto1hGycnPvE+gjbR5eFupTQzVUvuTpLS/3R RDVrG+BtOmPlCQsjlCy1aBXkNiFsdFCzdv9NnihxrD3b2tun9qJRLV7j37fp/aeP9gCm fwLetw9HhtWSnfGCcArLZrSQ7z0K8/kRYUm/QoIV19to1plMRcyKGEGXL6ov2grcQpSr fWTHYUKaa0f8FuctjNJxhvVmJ4NpUHScXtBv6wYqdtrVZJKZ359Y3YXLOW06HuV3tHOz MNTIN5DJ9t/XLoQtR98dKRrF1MkGgJ0gm2v/e4mZTUaIVqWRD7uMWslihlNd9vNzMn2B cNSQ== X-Gm-Message-State: ALyK8tLw2tkcjL775Cb5nGctb/XG1IRnVMkMY4EQHPe2wcSpzXf5nDINQgns+yk1NHIeaw== X-Received: by 10.25.149.13 with SMTP id x13mr3727066lfd.199.1468144005403; Sun, 10 Jul 2016 02:46:45 -0700 (PDT) Received: from [192.168.1.44] (ppp109-252-91-231.pppoe.spdop.ru. [109.252.91.231]) by smtp.gmail.com with ESMTPSA id 39sm4423342lja.37.2016.07.10.02.46.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jul 2016 02:46:44 -0700 (PDT) Subject: Re: GRUB does not work when sb_meta_uuid is set on XFSv5 To: The development of GNU GRUB , jack@suse.cz, marcosfrm@outlook.com References: <578009E2.3040606@gmail.com> From: Andrei Borzenkov Message-ID: <57821983.1070907@gmail.com> Date: Sun, 10 Jul 2016 12:46:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <578009E2.3040606@gmail.com> Content-Type: multipart/mixed; boundary="------------020507060005030908020604" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::242 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2016 09:46:52 -0000 This is a multi-part message in MIME format. --------------020507060005030908020604 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 ": >> > > 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? --------------020507060005030908020604 Content-Type: text/x-patch; name="xfs-meta_uuid.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xfs-meta_uuid.patch" From: Andrei Borzenkov 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) --------------020507060005030908020604--