From: Fabian Frederick <fabf@skynet.be>
To: Jan Kara <jack@suse.cz>, Al Viro <viro@ZenIV.linux.org.uk>
Cc: akpm@linux-foundation.org, mm-commits@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: Elevated i_writecount doesn't guarantee ->release to be called
Date: Fri, 30 Jan 2015 06:33:34 +0100 (CET) [thread overview]
Message-ID: <1531338050.57943.1422596014371.open-xchange@webmail.nmp.proximus.be> (raw)
In-Reply-To: <20150129173532.GF29656@ZenIV.linux.org.uk>
> On 29 January 2015 at 18:35 Al Viro <viro@ZenIV.linux.org.uk> wrote:
>
>
> On Thu, Jan 29, 2015 at 01:46:30PM +0100, Jan Kara wrote:
> > Thanks for pointing this out. You made me at look where exactly is
> > get_write_access() called and there are even places where we call it
> > without having file descriptor at all (e.g. truncate path). So ext3, ext4,
> > udf, and gfs2 are racy. If we race, results aren't that bad (we just keep
> > preallocated blocks in the inode) but still it would be nice to fix.
> >
> > Obviously we could maintain a private writecount in ->open() method but it
> > would seem a bit sad to do that for this mostly theoretical issue. Maybe we
> > just verify whether preallocation is truncated when evicting inode from
> > memory and if not, do it there. It's not perfect but even with current racy
> > solution noone noticed in practice.
>
> The trouble with doing that on inode eviction is that we might have done
> r/o remount by then, so any metadata writes are unexpected at that point...
What would you suggest then ? I could try to do the right update on AFFS
then apply it on ext3,4,udf,gfs2 as well. Maybe some generic_release
would be useful to avoid repeating the same logic around private
preallocation management ?
Regards,
Fabian
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2015-01-30 5:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <54c95874.1pbbCloLAl3wWsPR%akpm@linux-foundation.org>
[not found] ` <20150128224534.GB29656@ZenIV.linux.org.uk>
2015-01-29 12:46 ` Elevated i_writecount doesn't guarantee ->release to be called Jan Kara
2015-01-29 16:47 ` Fabian Frederick
2015-01-29 16:57 ` Jan Kara
2015-01-29 17:35 ` Al Viro
2015-01-30 5:33 ` Fabian Frederick [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=1531338050.57943.1422596014371.open-xchange@webmail.nmp.proximus.be \
--to=fabf@skynet.be \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--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).