linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: "Misono, Tomohiro" <misono.tomohiro@jp.fujitsu.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: btrfs-progs: suggestion of removing --commit-after option of subvol delete
Date: Tue, 19 Sep 2017 16:31:55 +0800	[thread overview]
Message-ID: <46ffdb8c-025c-9557-6f0a-d9e10dd3e834@gmx.com> (raw)
In-Reply-To: <3fab29e2-179e-2109-6217-1cb079f97f9e@jp.fujitsu.com>



On 2017年09月19日 15:50, Misono, Tomohiro wrote:
> Hello,
> 
> I read the code of "subvolume delete" and found that --commit-after option is
> not working well.
> 
> Since it issues BTRFS_IOC_START/WAIT_SYNC to the last fd (of directory
> containing the last deleted subvolume),
> 1. sync operation affects only the last fd's filesystem.
>     ("subvolume delete" can take multiple subvolumes on different filesystems.)
> 2. if the last delete action fails to open the path (fd == -1),
>     SYNC is not issued at all.
> 
> One solution is to keep every fd for deleted subvolumes, but I think it takes
> too much cost. Since we can just use "btrfs filesystem sync" after delete if
> needed, I think it is ok to remove --comit-after option.

Personally speaking I'm OK removing --commit-after, as implementing a 
full working --commit-after seems too complex for a minor feature.
(Need to finding the same fs of multiple subvolume and doing commit for 
each fs, and fallback to other fd if open failed)

Since --commit-after is a relatively lightweight solution compared to 
--commit-each, and both can only ensure subvolume doesn't show up, while 
"fi sync" can do a "deeper" sync to ensure the whole subvolume get 
removed on disk.

But instead of deleting the option, it would be better to keep it 
deprecated for a while.
Showing a message informing user this option is deprecated and falling 
back to --commit-each seems to be a better solution.

Thanks,
Qu
> 
> Regards,
> Tomohiro Misono
> (misono.tomohiro@jp.fujitsu.com)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2017-09-19  8:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19  7:50 btrfs-progs: suggestion of removing --commit-after option of subvol delete Misono, Tomohiro
2017-09-19  8:31 ` Qu Wenruo [this message]
2017-09-19 14:48 ` David Sterba
2017-09-20  0:01   ` Misono, Tomohiro
2017-09-20  0:22   ` Qu Wenruo
2017-09-20 14:03     ` David Sterba
2017-09-20 14:21       ` Qu Wenruo
2017-09-21  2:49         ` Misono, Tomohiro
2017-09-21  2:52           ` Qu Wenruo

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=46ffdb8c-025c-9557-6f0a-d9e10dd3e834@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=misono.tomohiro@jp.fujitsu.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 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).