From: Chris Wedgwood <cw@f00f.org>
To: xfs@oss.sgi.com
Subject: [PATCH] fix xfs_fsr insufficient space check
Date: Fri, 2 Jan 2009 02:03:06 -0800 [thread overview]
Message-ID: <20090102100306.GA36830@puku.stupidest.org> (raw)
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)) {
fsrprintf(_("insufficient freespace for: %s: "
- "size=%lld: ignoring\n"), fname, statp->bs_size);
+ "size=%lld: ignoring\n"), fname, statp->bs_blksize * statp->bs_blocks);
return 1;
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2009-01-02 10:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 10:03 Chris Wedgwood [this message]
2009-01-02 12:00 ` [PATCH] fix xfs_fsr insufficient space check Christoph Hellwig
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=20090102100306.GA36830@puku.stupidest.org \
--to=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