From: Christoph Hellwig <hch@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Mark Fasheh <mark.fasheh@oracle.com>
Subject: Re: [PATCH RESEND] Handle i_size > s_maxbytes correctly
Date: Wed, 23 Jan 2008 19:13:06 +0000 [thread overview]
Message-ID: <20080123191306.GA17118@infradead.org> (raw)
In-Reply-To: <20080123175440.GF10144@duck.suse.cz>
On Wed, Jan 23, 2008 at 06:54:41PM +0100, Jan Kara wrote:
> A different solution (even with smaller impact) would be to not allow
> files with i_size > s_maxbytes in VFS at all. For local filesystems we can
> just check this on open and everything is fine
Which we should do.
> but with remote filesystems
> such as OCFS2 (or NFS) filesize can be changed on the fly from a different
> machine. So to avoid problems we can either introduce some locking to
> prevent changes of i_size from other machines while we are in critical
> sections (awww, I really don't think this is better) or truncate i_size to
> s_maxbytes when we update i_size from what we've received via network /
> shared storage (but then we'd have to track whether user truncated file to
> some size or whether fs truncated it just for safety and apps could be
> confused too). So I don't think this is really feasible.
The right fix for cluster filesystem is to have a coherent maximum file
size for the whole cluster. If that can't be done due to protocol
reason we need to lock around i_size update and revoke access to the
inode on the client that doesn't support it. Which of course would
require a working revoke to start with..
next prev parent reply other threads:[~2008-01-23 19:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-23 17:54 [PATCH RESEND] Handle i_size > s_maxbytes correctly Jan Kara
2008-01-23 19:13 ` Christoph Hellwig [this message]
2008-01-23 19:41 ` Jan Kara
2008-01-25 23:39 ` Mark Fasheh
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=20080123191306.GA17118@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.fasheh@oracle.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