Re: [vserver] 4.1.39 patch

From: Ghislain Adnet <gadnet_at_aqueos.com>
Date: Wed 05 Apr 2017 - 17:04:46 BST
Message-ID: <b976a0dc-09e3-2aca-a80d-5000a388125f@aqueos.com>

> Excellent detective work!
>
> Thanks for the patch,
> Herbert

as mike said i reversed it for testfs.sh so beware :) my patching foo is lacking a lot :(
for the kernel patch i walk on the shoulder of Giants as this comes from Guy- on irc. Thanks for sharing with us.

If i can be of any help my test server is still running 4.1.39 :)

Ghis.

HOST:root@58386hd51145:[~]: diff -Naur testfs.sh.1 testfs.sh
--- testfs.sh.1 2009-11-30 19:46:52.000000000 +0100
+++ testfs.sh 2017-04-05 11:02:46.118757957 +0200
@@ -279,9 +279,9 @@
     local space_used=0
     local inodes_used=0

- _DLIMIT_DF_SPACE=`df "$path" |
+ _DLIMIT_DF_SPACE=`df -P "$path" |
        awk '$3 ~ /^[0-9]+$/ { if (NF == 5) { print $2 } else { print $3 } }'`
- _DLIMIT_DF_INODE=`df -i "$path" |
+ _DLIMIT_DF_INODE=`df -P -i "$path" |
        awk '$3 ~ /^[0-9]+$/ { if (NF == 5) { print $2 } else { print $3 } }'`
     eval `vdlimit --xid "$xid" "$path" | grep _used=`

@@ -300,7 +300,7 @@
     local df_space=0
     local df_inode=0

- df_space=`df "$path" |
+ df_space=`df -P "$path" |
        awk '$3 ~ /^[0-9]+$/ { if (NF == 5) { print $2 } else { print $3 } }'`
     df_inode=`df -i "$path" |
        awk '$3 ~ /^[0-9]+$/ { if (NF == 5) { print $2 } else { print $3 } }'`

----------------------------------------------------
--- kernel/vserver/inode.c.orig 2017-04-04 10:51:46.478860945 +0200
+++ kernel/vserver/inode.c 2017-04-04 10:53:41.799085647 +0200
@@ -225,7 +225,8 @@
                if (in->i_op && in->i_op->setattr)
                        error = in->i_op->setattr(de, &attr);
                else {
- error = inode_change_ok(in, &attr);
+ //error = inode_change_ok(in, &attr);
+ error = setattr_prepare(de, &attr);
                        if (!error) {
                                setattr_copy(in, &attr);
                                mark_inode_dirty(in);
------------------------------------------------------------
Received on Wed Apr 5 17:04:59 2017

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 05 Apr 2017 - 17:04:59 BST by hypermail 2.1.8