From: Nick Piggin <npiggin@suse.de>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: Christoph Hellwig <hch@lst.de>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
open-osd <osd-dev@open-osd.org>
Subject: Re: [PATCH ver3] exofs: New truncate sequence
Date: Wed, 2 Jun 2010 01:09:18 +1000 [thread overview]
Message-ID: <20100601150918.GY9453@laptop> (raw)
In-Reply-To: <4C04EF92.6060600@panasas.com>
On Tue, Jun 01, 2010 at 02:31:30PM +0300, Boaz Harrosh wrote:
>
> These changes are crafted based on the similar
> conversion done to ext2 by Nick Piggin.
>
> * Remove the deprecated ->truncate vector. Let exofs_setattr
> take care of on-disk size updates.
> * Call truncate_pagecache on the unused pages if
> write_begin/end fails.
> * Cleanup exofs_delete_inode that did stupid inode
> writes and updates on an inode that will be
> removed.
> * And finally get rid of exofs_get_block. We never
> had any blocks it was all for calling nobh_truncate_page.
> nobh_truncate_page is not actually needed in exofs since
> the last page is complete and gone, just like all the other
> pages. There is no partial blocks in exofs.
> [OK do I need a partial read here upto i_size ???]
You shouldn't need to. We do have some interesting code trying to deal
with mmap data past i_size in core/buffer code. I hope Jan's patches
can improve that.
But anyway if you are not doing byte based IO, you have to remember
that if you mark a page uptodate, it should not contain uninitialized
data past i_size. Also, in the writeback path, junk data can get
written past i_size too.
The latter case is difficult to avoid (due to concurrent mmap writes).
It is not technically a leak perhaps, but it's a bit nasty if you allow
data to be hidden past i_size. The best course of action IMO is to
zero this out at read-in and truncate-extend time.
Doesn't seem like you have to worry about any of that if you have
byte granularity , although you do have EXOFS_BLKSHIFT defined?
prev parent reply other threads:[~2010-06-01 15:09 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
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 [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=20100601150918.GY9453@laptop \
--to=npiggin@suse.de \
--cc=bharrosh@panasas.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=osd-dev@open-osd.org \
/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.