linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
To: Amir Goldstein <amir73il@gmail.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Miklos Szeredi <miklos@szeredi.hu>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>,
	Linux Containers <containers@lists.linux-foundation.org>,
	Theodore Tso <tytso@mit.edu>
Subject: Re: [PATCH] ovl: skip overlayfs superblocks at global sync
Date: Thu, 9 Apr 2020 14:28:55 +0300	[thread overview]
Message-ID: <67bdead3-a29f-a8af-5e7b-193a72cd4b86@yandex-team.ru> (raw)
In-Reply-To: <CAOQ4uxgTtbb-vDQNnY1_7EzQ=p5p2MqkfyZo2zkFQ1Wv29uqCA@mail.gmail.com>

On 09/04/2020 13.23, Amir Goldstein wrote:
> On Thu, Apr 9, 2020 at 11:30 AM Konstantin Khlebnikov
> <khlebnikov@yandex-team.ru> wrote:
>>
>> Stacked filesystems like overlayfs has no own writeback, but they have to
>> forward syncfs() requests to backend for keeping data integrity.
>>
>> During global sync() each overlayfs instance calls method ->sync_fs()
>> for backend although it itself is in global list of superblocks too.
>> As a result one syscall sync() could write one superblock several times
>> and send multiple disk barriers.
>>
>> This patch adds flag SB_I_SKIP_SYNC into sb->sb_iflags to avoid that.
>>
>> Reported-by: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
>> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
>> ---
> 
> Seems reasonable.
> You may add:
> Reviewed-by: Amir Goldstein <amir73il@gmail.com>
> 
> +CC: containers list

Thanks

> 
> This bring up old memories.
> I posted this way back to fix handling of emergency_remount() in the
> presence of loop mounted fs:
> https://lore.kernel.org/linux-ext4/CAA2m6vfatWKS1CQFpaRbii2AXiZFvQUjVvYhGxWTSpz+2rxDyg@mail.gmail.com/
> 
> But seems to me that emergency_sync() and sync(2) are equally broken
> for this use case.
> 
> I wonder if anyone cares enough about resilience of loop mounted fs to try
> and change the iterate_* functions to iterate supers/bdevs in reverse order...

Now I see reason behind "sync; sync; sync; reboot" =)

Order old -> new allows to not miss new items if list modifies.
Might be important for some users.

bdev iteration seems already reversed: inode_sb_list_add adds to the head

> 
> Thanks,
> Amir.
> 

  reply	other threads:[~2020-04-09 11:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09  8:29 [PATCH] ovl: skip overlayfs superblocks at global sync Konstantin Khlebnikov
2020-04-09 10:23 ` Amir Goldstein
2020-04-09 11:28   ` Konstantin Khlebnikov [this message]
2020-04-09 11:48     ` Amir Goldstein
2020-04-09 12:04       ` Konstantin Khlebnikov
2020-04-09 13:22         ` Amir Goldstein
2020-04-11 22:28 ` Dave Chinner
2020-04-12  6:46   ` Amir Goldstein
2020-04-21  9:36 ` Miklos Szeredi

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=67bdead3-a29f-a8af-5e7b-193a72cd4b86@yandex-team.ru \
    --to=khlebnikov@yandex-team.ru \
    --cc=amir73il@gmail.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=dmtrmonakhov@yandex-team.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /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).