All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <chao2.yu@samsung.com>
To: 'Marc Lehmann' <schmorp@schmorp.de>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 3/5] f2fs: report readonly status in ->fsync
Date: Mon, 28 Dec 2015 17:59:19 +0800	[thread overview]
Message-ID: <006c01d14156$83ab2780$8b017680$@samsung.com> (raw)
In-Reply-To: <20151226063258.GA4641@schmorp.de>

> -----Original Message-----
> From: Marc Lehmann [mailto:schmorp@schmorp.de]
> Sent: Saturday, December 26, 2015 2:33 PM
> To: Chao Yu
> Cc: linux-f2fs-devel@lists.sourceforge.net
> Subject: Re: [f2fs-dev] [PATCH 3/5] f2fs: report readonly status in ->fsync
> 
> On Thu, Dec 24, 2015 at 06:07:25PM +0800, Chao Yu <chao2.yu@samsung.com> wrote:
> > Report readonly status of filesystem during fsync.
> 
> If this means that fsync returns EROFS when used on a file on a read-only
> filesystem., then this looks buggy - EROFS is not documented for
> fsync (only as "fd is bound to a special file which does not support
> synchronization") for this condition, and I don't think other filesystems
> do that (just tried xfs).

Yes.

> 
> It also doesn't quite make sense - fsync should only fail when the file
> couldn't be synced, but in most (probably all) cases, the file is already
> synchronised, otherwise the filesystem shouldn't be RO.

Agreed,

One situation here is if '.' or '..' in dentry page of directory inode was
missing (corrupted directory), once fsck found this kind of inode exist in
the image, it will mark inode with F2FS_INLINE_DOTS flag, after that f2fs
will try to recover it to normal one if user touch such inode in ->lookup,
so the dirty data was generated even in a readonly fs.

Actually even for above case, it would be better to avoid generating dirty
data rather than stop user fsync in a readonly fs.

Hi Jaegeuk, could you help to drop this patch?

And one more thing is how do you think of moving inline dot recovery into
fsck?

Thanks,

> 
> I only looked at the diff, so if I missed the context and my reasoning
> doesn't apply, forgive and ignore me :)
> 
> --
>                 The choice of a       Deliantra, the free code+content MORPG
>       -----==-     _GNU_              http://www.deliantra.net
>       ----==-- _       generation
>       ---==---(_)__  __ ____  __      Marc Lehmann
>       --==---/ / _ \/ // /\ \/ /      schmorp@schmorp.de
>       -=====/_/_//_/\_,_/ /_/\_\


------------------------------------------------------------------------------

  reply	other threads:[~2015-12-28 10:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24 10:07 [PATCH 3/5] f2fs: report readonly status in ->fsync Chao Yu
2015-12-26  6:32 ` Marc Lehmann
2015-12-28  9:59   ` Chao Yu [this message]
2015-12-28 22:43     ` Jaegeuk Kim
2015-12-29  6:21       ` Chao Yu
2015-12-30  0:32         ` Jaegeuk Kim
2015-12-30  6:46           ` Chao Yu

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='006c01d14156$83ab2780$8b017680$@samsung.com' \
    --to=chao2.yu@samsung.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=schmorp@schmorp.de \
    /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.