All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Bug: btrfs dev del missing fails where it shouldn't
Date: Mon, 27 Mar 2017 15:30:27 +0000 (UTC)	[thread overview]
Message-ID: <pan$eac86$c78d3917$f70a02ec$1b8bf9ef@cox.net> (raw)
In-Reply-To: c2f848ab7e4294f35f1bca29db33e3de@webmail.pados.hu

Karoly Pados posted on Mon, 27 Mar 2017 14:12:58 +0000 as excerpted:

>> But, even there, a close read says missing tells btrfs to delete the
>> first device described by the filesystem metadata that wasn't present
>> when the filesystem was mounted. And since your case does a remount,
>> not a full unmount and clean mount, that "missing" device was present
>> when the filesystem was mounted, so attempting to delete missing
>> /should/ be expected to fail.
> 
> I checked, and a full unmount+mount instead of a remount makes 'missing'
> work for me as expected. Thank you once more. Here though I have a (IMHO
> important) feature suggestion: make 'missing' behave the same after a
> remount as after a full-unmount-mount. And though I have no specific
> example yet, possibly other features too aside from 'missing'. For a
> simple reason:
> 
> Even if you describe 'missing' as "delete the first device described by
> the filesystem metadata that wasn't present when the filesystem was
> mounted", no normal admin or user is going to interpret it that way. You
> are right the info is in there, and kernel or btrfs devs will take that
> sentence apart like lawyers and interpret it very exactly. But I dare to
> say that most admins think of remount as unmount-mount-on-steroids,
> basically as a possibly atomic unmount+mount that does not break file
> descriptors. My point is, I argue that most people will expect 'missing'
> to work after a remount even after reading its correct description
> above. So I would either explicitly spell out in the docs that 'missing'
> will not work in that case, or better, 'fix' it to work even after a
> remount.

FWIW...

I absolutely agree with you on how an admin would take delete missing, as 
I'd definitely expect it to work that way myself.  =:^/  Only after 
having it fail would I be trying to figure out why, and presumably would 
come across that "at mount" wording and smack myself upside the head, 
"Oh, OK, I can deal with that!"

Unfortunately, I suspect the change at least short term will have to be 
spelling it out explicitly in the docs, as btrfs as it currently is 
really doesn't have the concept of a device going MIA, missing in action, 
and will simply continue to try to write to it, filling memory with 
unwritten data...  IOW, the "missing" thing isn't the only or even the 
most critical issue with btrfs not really detecting device presence or 
absence except on mount.

There are longer-term-project patches to change that and make btrfs aware 
of device changes, but AFAIK, they're moldering in a developer's branch 
somewhere (the global hot-spare patches branch), and when they'll 
actually be polished up and mainlined is I believe unknown, ATM.  
Certainly I don't know, tho Chris Mason and the dev in question might 
have some general idea.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


      reply	other threads:[~2017-03-27 15:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 14:07 Bug: btrfs dev del missing fails where it shouldn't Károly Pados
2017-03-24  5:48 ` Duncan
2017-03-27 14:12 ` Karoly Pados
2017-03-27 15:30   ` Duncan [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='pan$eac86$c78d3917$f70a02ec$1b8bf9ef@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --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 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.