ext4 support for save-file

01micko posted patches to add support for the ext4 filesystem in the save-file:
http://bkhome.org/blog/?viewDetailed=02798

Thanks, I have implemented this, see commit (the relevant files are rc.shutdown and shutdownconfig):
http://bkhome.org/fossil/woof2.cgi/info/52c69e3b0e


Posted on 27 Apr 2012, 8:54


Comments:

Posted on 27 Apr 2012, 8:12 by 01micko
ext4
Good to see you fixed the ext4 test, I was a bit lazy I guess.

Subsequently, I did test outside of X and had no problem.


Posted on 27 Apr 2012, 15:09 by Iguleder1
XFS?
What about XFS? Seems like a great choice for save files - if support for it can be added the same way, why not?


Posted on 27 Apr 2012, 24:33 by K Godt
grep bug ?
|	334	[ -f /lib/modules/${KVER}/modules.builtin ] && [ "`grep 'fs/ext4`" != "" ] && HAVEEXT4='yes'

looks buggy to me
[ -f /lib/modules/${KVER}/modules.builtin ] && [ "`grep 'fs/ext4'`" != "" ] && HAVEEXT4='yes'

1)grep is missing a single quote and
2)grep without filename will wait for inputs; in shutdown funny .

I dont know where to grep fs/ext4 in a file or dir ?

bash-3.2#
grep ext4 /lib/modules/`uname -r`/*

/lib/modules/2.6.37.4-KRG-iatom-1/modules.builtin:kernel/fs/ext4/ext4.ko
ls /lib/modules/`uname -r`/kernel/fs



Posted on 28 Apr 2012, 5:18 by technosaurus
grep ext4 /proc/filesystems
That is really bad anyways - what if someday you decide to improve the kernel config to have builtin ext4(it would break)... a better method would be to use /proc/filesystems

my personal opinion is that if it is in the initramfs, it should be built in if at all possible


Posted on 28 Apr 2012, 7:20 by 01micko
ext4 test
Hmmm.. I shouldn't be so lazy..

Shinobar's way is probably the best.

which mkfs.ext4 &>/dev/null
if [ "$?" = "0" ];then
(and so on)


Posted on 28 Apr 2012, 8:42 by BarryK
ext4 fixed
K Godt,
Oh dear, a major lapse of attention on my part. Thanks, fixed.

technosaurus,
The code does test for builtin ext4, using modules.builtin. And as a module using 'modinfo'.
Probably not in the most efficient way though.

Your suggestion to just test /proc/filesystems, yes, that is simplest, I will change to just that:

grep 'ext4$' /proc/filesystems



Posted on 28 Apr 2012, 15:55 by L18L
grep
simpler than simplest:
# grep ext4$ /proc/filesystems 

ext4
#

(without quotes)