linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marco Stornelli <marco.stornelli@gmail.com>
To: linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	tytso@mit.edu, chris.mason@oracle.com
Subject: Bug in ext4/btrfs fallocate?
Date: Tue, 28 Dec 2010 17:06:52 +0100	[thread overview]
Message-ID: <4D1A0B1C.70406@gmail.com> (raw)

Hi,

it seems that ext4/btrfs code for fallocate doesn't check for
immutable/append inode flag. I think it's possible to do an fallocate
operation even if the immutable flag is turned on. You can think about
this case: an application opens a file for read/write, meanwhile a user
set the immutable flag and then the application calls fallocate. Other
cases shouldn't happen because if the immutable flag is turned on before
the application opens the file, then the application can't open the file
in read/write mode and therefore it can't do an fallocate operation.
Sincerely I haven't tried but I saw this kind of error in my own fs that
have a similar code.

Regards,

Marco

             reply	other threads:[~2010-12-28 16:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28 16:06 Marco Stornelli [this message]
2010-12-29  6:46 ` Bug in ext4/btrfs fallocate? Andreas Dilger
2010-12-29  9:02   ` Marco Stornelli

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=4D1A0B1C.70406@gmail.com \
    --to=marco.stornelli@gmail.com \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).