From: Boaz Harrosh <bharrosh@panasas.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Nick Piggin <npiggin@suse.de>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
open-osd <osd-dev@open-osd.org>,
Al Viro <viro@ZenIV.linux.org.uk>
Subject: Re: [PATCH ver2] exofs: New truncate sequence
Date: Tue, 01 Jun 2010 13:59:53 +0300 [thread overview]
Message-ID: <4C04E829.6070609@panasas.com> (raw)
In-Reply-To: <20100601104354.GA2057@lst.de>
On 06/01/2010 01:43 PM, Christoph Hellwig wrote:
> On Tue, Jun 01, 2010 at 01:28:50PM +0300, Boaz Harrosh wrote:
>> + if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
>> + S_ISLNK(inode->i_mode)))
>> + return -EINVAL;
>> if (exofs_inode_is_fast_symlink(inode))
>> - return;
>> + return -EINVAL;
>
> do_sys_truncate already makes sure ATTR_SIZE changes only happen on
> ISREG files.
>
I copy/pasted this from ext2_setsize. (Would you remove it from
there as well?)
>> if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
>> - return;
>
> Same for these - IS_APPEND directly and IS_IMMUTABLE via
> inode_permission().
>
>> + oldsize = inode->i_size;
>> + i_size_write(inode, newsize);
>> + truncate_pagecache(inode, oldsize, newsize);
>
> At this point you can probably just inline this in exofs_setattr.
> Especially as the lines above will be replaced with a single
> function call in my next batch.
>
OK, I'm re-spinning minus these and inlined. I'll want to
re-run a few tests just to make sure.
Thanks
Boaz
next prev parent reply other threads:[~2010-06-01 10:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 12:30 [RFC] exofs: New truncate sequence Boaz Harrosh
2010-05-31 13:44 ` Nick Piggin
2010-05-31 14:13 ` Boaz Harrosh
2010-05-31 14:33 ` Nick Piggin
2010-05-31 14:50 ` Boaz Harrosh
2010-05-31 15:09 ` Nick Piggin
2010-05-31 15:19 ` Boaz Harrosh
2010-06-01 10:08 ` Christoph Hellwig
2010-06-01 10:26 ` Boaz Harrosh
2010-06-01 10:44 ` Christoph Hellwig
2010-06-01 11:05 ` Boaz Harrosh
2010-06-01 11:06 ` Christoph Hellwig
2010-06-01 10:28 ` [PATCH ver2] " Boaz Harrosh
2010-06-01 10:43 ` Christoph Hellwig
2010-06-01 10:59 ` Boaz Harrosh [this message]
2010-06-01 11:06 ` Christoph Hellwig
2010-06-01 11:31 ` [PATCH ver3] " Boaz Harrosh
2010-06-01 11:36 ` Christoph Hellwig
2010-06-01 11:52 ` Boaz Harrosh
2010-06-01 15:09 ` Nick Piggin
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=4C04E829.6070609@panasas.com \
--to=bharrosh@panasas.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=npiggin@suse.de \
--cc=osd-dev@open-osd.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 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.