From: Christoph Hellwig <hch@infradead.org>
To: Chris Wedgwood <cw@f00f.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] fix xfs_fsr insufficient space check
Date: Fri, 2 Jan 2009 07:00:00 -0500 [thread overview]
Message-ID: <20090102120000.GA9789@infradead.org> (raw)
In-Reply-To: <20090102100306.GA36830@puku.stupidest.org>
On Fri, Jan 02, 2009 at 02:03:06AM -0800, Chris Wedgwood wrote:
> The xfs_fsr insufficient check should consider the blocks used not the
> file length. Without this change it is not possible to reorganize
> sparse files when file size exceeds the free space.
>
> Signed-off-by: Chris Wedgwood <cw@f00f.org>
>
>
> --- fsr/xfs_fsr.c.orig 2009-01-02 01:51:03.049181411 -0800
> +++ fsr/xfs_fsr.c 2009-01-02 01:53:56.297180891 -0800
> @@ -912,9 +912,9 @@
> }
> bsize = vfss.f_frsize ? vfss.f_frsize : vfss.f_bsize;
>
> - if (statp->bs_size > ((vfss.f_bfree * bsize) - minimumfree)) {
> + if ((statp->bs_blksize * statp->bs_blocks) > ((vfss.f_bfree * bsize) - minimumfree)) {
I'll put this after fixing the line length and removing all the
superflous braces. Also we probably want a comment that bs_blksize
in xfs_bstat_t actually is the blocksize, unlike st_blksize in struct
stat.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2009-01-02 12:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 10:03 [PATCH] fix xfs_fsr insufficient space check Chris Wedgwood
2009-01-02 12:00 ` 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=20090102120000.GA9789@infradead.org \
--to=hch@infradead.org \
--cc=cw@f00f.org \
--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