OpenVZ Forum


Home » Mailing lists » Devel » [KERNEL COMMIT]: diff-simfs-statfs-20051228
[KERNEL COMMIT]: diff-simfs-statfs-20051228 [message #626] Wed, 28 December 2005 15:20
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Committed in 022stab058

Patch from Dmitry (dim@), issue found by BJMG:
- fixed statfs over simfs with enabled LBD


--- ./fs/simfs.c.statfs 2005-12-13 16:15:01.000000000 +0300
+++ ./fs/simfs.c 2005-12-28 15:42:37.000000000 +0300
@@ -122,6 +122,7 @@ static int sim_statfs(struct super_block
{
int err;
struct super_block *lsb;
+ struct kstatfs statbuf;

err = 0;
if (sb->s_op != &sim_super_ops)
@@ -131,11 +132,17 @@ static int sim_statfs(struct super_block

err = -ENOSYS;
if (lsb && lsb->s_op && lsb->s_op->statfs)
- err = lsb->s_op->statfs(lsb, (struct kstatfs *)buf);
+ err = lsb->s_op->statfs(lsb, &statbuf);
if (err)
goto out;

- quota_get_stat(sb, (struct kstatfs *)buf);
+ quota_get_stat(sb, &statbuf);
+
+ buf->f_files = statbuf.f_files;
+ buf->f_ffree = statbuf.f_ffree;
+ buf->f_blocks = statbuf.f_blocks;
+ buf->f_bfree = statbuf.f_bfree;
+ buf->f_bavail = statbuf.f_bavail;
out:
return err;
}
 
Read Message
Previous Topic: [PATCH] fix of sim_statfs
Next Topic: [ANNOUNCE] OpenVZ patch for 2.6.15 kernel
Goto Forum:
  


Current Time: Fri Oct 10 21:57:49 GMT 2025

Total time taken to generate the page: 0.24864 seconds