From: Nick Piggin <npiggin@suse.de>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-fsdevel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] vfs: reorganize inode chattr checks
Date: Thu, 18 Mar 2010 10:44:56 +1100 [thread overview]
Message-ID: <20100317234455.GA25636@laptop> (raw)
In-Reply-To: <87pr32yix3.fsf@openvz.org>
On Wed, Mar 17, 2010 at 08:09:12PM +0300, Dmitry Monakhov wrote:
>
> This patch fix nasty bug with truncate on swapfile.
> It contains only vfs core helpers and fix isize check path for
> fs w/o i_op->setattr method. Later i'll send corresponding changes
> to other fs which has ->setattr method.
>
> This patch is depends on Nick's patch
> http://marc.info/?l=linux-fsdevel&m=126752788514574&w=2
>
> >From e8587585b2e2fefb75d47f8d50ddc7099a50873c Mon Sep 17 00:00:00 2001
> From: Dmitry Monakhov <dmonakhov@openvz.org>
> Date: Wed, 17 Mar 2010 19:49:22 +0300
> Subject: [PATCH] vfs: reorganize inode chattr checks
>
> vmtrucate may fail due to IS_SWAPFILE flag or due to RLIMIT_FSIZE.
> In some situations it is not acceptable behaviour. Off course
> we can check IS_SWAPFILE before but what about RLIMIT_FSIZE?
>
> Let's divide newsize seting logic in two parts
> First which perform necessery size checks
> Second which does the work and can not fail.
> And perform size check before any inode modifications.
Yep, I think it is a good idea to perform these checks as early as
possible.
next prev parent reply other threads:[~2010-03-17 23:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 17:09 [PATCH] vfs: reorganize inode chattr checks Dmitry Monakhov
2010-03-17 17:18 ` Dmitry Monakhov
2010-03-17 23:44 ` Nick Piggin [this message]
2010-04-06 10:15 ` PING " Dmitry Monakhov
2010-04-09 19:00 ` Valerie Aurora
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=20100317234455.GA25636@laptop \
--to=npiggin@suse.de \
--cc=dmonakhov@openvz.org \
--cc=linux-fsdevel@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).