From: Christoph Hellwig <hch@infradead.org>
To: Lachlan McIlroy <lachlan@sgi.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [Fwd: [PATCH] Fix speculative allocation beyond eof]
Date: Wed, 17 Dec 2008 09:24:42 -0500 [thread overview]
Message-ID: <20081217142442.GC22023@infradead.org> (raw)
In-Reply-To: <49378444.9040108@sgi.com>
On Thu, Dec 04, 2008 at 06:18:28PM +1100, Lachlan McIlroy wrote:
> Speculative allocation beyond eof doesn't work properly. It was broken some
> time ago after a code cleanup that moved what is now xfs_iomap_eof_align_last_fsb()
> and xfs_iomap_eof_want_preallocate() out of xfs_iomap_write_delay() into
> separate functions. The code used to use the current file size in various checks
> but got changed to be max(file_size, i_new_size). Since i_new_size is the result
> of 'offset + count' then in xfs_iomap_eof_want_preallocate() the check for
> '(offset + count) <= isize' will always be true.
>
> ie if 'offset + count' is > ip->i_size then isize will be i_new_size and equal to
> 'offset + count'.
>
> This change fixes all the places that used to use the current file size.
Looks good, we should be using the current i_size everywhere.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2008-12-17 14:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 7:18 [Fwd: [PATCH] Fix speculative allocation beyond eof] Lachlan McIlroy
2008-12-17 14:24 ` Christoph Hellwig [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=20081217142442.GC22023@infradead.org \
--to=hch@infradead.org \
--cc=lachlan@sgi.com \
--cc=xfs@oss.sgi.com \
/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