linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Giuseppe Della Bianca <giusdbg@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [COMMAND HANGS] The command 'btrfs subvolume sync -s 2 xyz' can hangs.
Date: Tue, 8 Jan 2019 16:18:11 -0500	[thread overview]
Message-ID: <04891508-41fd-9d63-9dfb-a51041a3b8ea@suse.com> (raw)
In-Reply-To: <70326422.XUdVI2pWXa@exnet.gdb.it>


[-- Attachment #1.1: Type: text/plain, Size: 1963 bytes --]

On 1/8/19 4:02 PM, Giuseppe Della Bianca wrote:
> In data lunedì 7 gennaio 2019 23:40:19 CET, Jeff Mahoney ha scritto:
> ]zac[
>>> If you want, I can send you the full log (very long).
>>> From what you wrote below it seems to me that you do not need it
>>
>> Please do.  It would be good to see what the state of the extent tree is
>> there.
> 
> 
> -- Logs begin at Sat 2016-11-26 18:16:29 CET, end at Tue 2019-01-08 21:39:44 

Thanks.  As it turns out, since Filipe's identified the fix for this
issue, we don't need it anymore.  If that turns out to be a different
issue, we can revisit the log.

> ]zac[
>>>> It also means that the subvolume is never going to disappear during this
>>>> mount and 'btrfs subvol sync' will wait forever.
>>>
>>> ]zac[
>>>
>>> In my opinion this is bad.
>>
>> Agreed.  I was describing what the situation is, not how it should be.
> 
> Ok, sorry ( :) ).
> 
> ]zac[
>> It's something that needs fixing.  The question is how to go about that.
>>  My first take on it is to have that loop also check whether the file
> ]zac[
> 
> I don't know how btrfs works inside.
> I just suppose that somewhere in the code an error state is not handled 
> correctly (which can be a file or the whole filesystem not accessible).

Kind of, if you look at it under the right light.  The sync subcommand
only waits for the lookup for the subvolume undergoing deletion to not
be there anymore.  There's no error state to be passed back to the
waiter, only the initiator.

The command will hang any time a situation arises that the subvolume
won't go away.  That includes:
1) Read-only file system, intentionally
2) Read-only file system as part of a failure
3) Specifying a subvolume that isn't being deleted

The first two mean that the condition can never be met.  The latter is
something of a special case since the user could remove it at any time.

-Jeff
-- 
Jeff Mahoney
SUSE Labs



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-01-08 21:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09 15:15 [COMMAND HANGS] The command 'btrfs subvolume sync -s 2 xyz' can hangs Giuseppe Della Bianca
2018-08-09 18:48 ` Jeff Mahoney
2018-08-10 16:57   ` Giuseppe Della Bianca
2019-01-01 16:37   ` Giuseppe Della Bianca
2019-01-04 20:34     ` Jeff Mahoney
2019-01-05 12:30       ` Giuseppe Della Bianca
2019-01-06 14:12         ` Qu Wenruo
2019-01-06 17:57           ` Giuseppe Della Bianca
2019-01-06 23:55             ` Qu Wenruo
     [not found]               ` <CAO6awePqby834dBSgLx5r6onmD9HhGWAfN4bno0zK6pU0QjrEQ@mail.gmail.com>
2019-01-07 12:55                 ` Fwd: " gius db
2019-01-07 13:31                   ` Qu Wenruo
     [not found]                     ` <CAO6aweMu9HUn34406Kkh-UvoDyoJH2ZdGUQx3vdx1Rj955E4KQ@mail.gmail.com>
2019-01-07 17:53                       ` Fwd: " gius db
2019-01-07 22:40         ` Jeff Mahoney
2019-01-08 21:02           ` Giuseppe Della Bianca
2019-01-08 21:18             ` Jeff Mahoney [this message]
2019-01-08 21:55               ` Giuseppe Della Bianca
2019-01-07 23:11     ` Filipe Manana
2019-01-08 12:14       ` gius db
2019-01-08 12:29         ` Filipe Manana
2019-01-08 13:01           ` gius db

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=04891508-41fd-9d63-9dfb-a51041a3b8ea@suse.com \
    --to=jeffm@suse.com \
    --cc=giusdbg@gmail.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;
as well as URLs for NNTP newsgroup(s).