public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] btrfs: indicate iversion option in show_options
Date: Wed, 29 Jul 2020 10:49:51 -0700	[thread overview]
Message-ID: <c6ecb493-e769-0db0-7d44-5bfaf0b89fad@redhat.com> (raw)
In-Reply-To: <e8a98d4d-505f-de47-d469-c0cdaac5351c@toxicpanda.com>

On 7/29/20 10:47 AM, Josef Bacik wrote:
> On 7/29/20 1:42 PM, Eric Sandeen wrote:
>> On 7/29/20 9:46 AM, Josef Bacik wrote:
>>> Eric reported a problem where if you did
>>>
>>> mount -o remount /some/btrfs/fs
>>>
>>> you would lose SB_I_VERSION on the mountpoint.  After a very convoluted
>>> search I discovered this is because the remount infrastructure doesn't
>>> just say "change these things specifically", but it actually depends on
>>> userspace to tell it fucking everything that needs to be set on the
>>> mountpoint.  This led to the fucking horrifying discovery that
>>> util-linux actually has to parse /proc/mounts to figure out what the
>>> fuck is set on the mount point in order to preserve any of the options
>>> it's not actually fucking with, so in this case iversion.  If we don't
>>> indicate iversion is set, then we get iversion cleared on the mount,
>>> because util-linux doesn't pass in MS_I_VERSION as it's mount flags.
>>>
>>> So work around this fucking insanity by spitting out iversion in
>>> /proc/mounts so we get the correct flags passed to us in remount.
>>
>> Hmmm:
>>
>> # mount -o loop,noiversion btrfsfile mnt
>> # grep btrfs /proc/mounts
>> /dev/loop0 /tmp/mnt btrfs rw,seclabel,relatime,iversion,space_cache,subvolid=5,subvol=/ 0 0
>> #
>>
> 
> Ugh that's because we just set it unconditionally like XFS does, but don't actually pay attention to noiversion otherwise.  I'll fix that separately.  Thanks,

FWIW,

# mount -o remount,noiversion mnt
# grep btrfs /proc/mounts
/dev/loop0 /tmp/mnt btrfs rw,seclabel,relatime,noiversion,space_cache,subvolid=5,subvol=/ 0 0

-Eric


      reply	other threads:[~2020-07-29 17:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 16:46 [PATCH] btrfs: indicate iversion option in show_options Josef Bacik
2020-07-29 17:42 ` Eric Sandeen
2020-07-29 17:47   ` Josef Bacik
2020-07-29 17:49     ` Eric Sandeen [this message]

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=c6ecb493-e769-0db0-7d44-5bfaf0b89fad@redhat.com \
    --to=sandeen@redhat.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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