lkml.org 
[lkml]   [2004]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: truncate shows non zero data beyond the end of the inode with MAP_SHARED
On Wed, Sep 15, 2004 at 02:55:24PM -0700, Andrew Morton wrote:
> William Lee Irwin III <wli@holomorphy.com> wrote:
> >
> > Zeroing the final partial page during expanding truncate (flushing TLB)
> > sounds like a reasonable half measure; we don't do anything at the moment.
>
> Sure about that? block_truncate_page() gets called.

block_truncate_page is executed on the _new_ partial page, what we're
talking about here is the _old_ partial page, the partial page before
calling truncate. That one isn't zeroed out, and zeroing it out would
require marking it dirty too since the garbage could be flushed to disk
already. That's why I was sticking with a solution that would leave
truncate a no-I/O operation as far as a data is concerned (and in
general a solution that would never generate any further I/O compared to
current kernel).

Probably we can ignore this thanks to Alan's feedback.

(also note, we should talk about partial blocks here, not partial pages,
partial pages isn't the issue if the i_size is softblocksize aligned,
but let's assume 4k softblocksize on a x86 or x86-64 for clarity so that
pages is the same as softblocksize ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.099 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site