[[!meta copyright="Copyright © 2007, 2008, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] # Implementation * [[filetype]] option * [[Hurd-specific_extensions]] * [[Page_cache]] * [[metadata_caching]] * [[internal_allocator]] ## Large Stores The `ext2fs` translator from the upstream Hurd code base can only handle file systems with sizes of less than roughly 2 GiB. [[!tag open_issue_hurd]] ### Ognyan's Work * Ognyan Kulev, [[*Supporting Large ext2 File Systems in the Hurd*|ogi-fosdem2005.mgp]], 2005, at FOSDEM * Ognyan Kulev, [[large_stores]] * Ognyan's patch lifts this limitation (and is being used in the [[Debian_GNU/Hurd_distribution|running/debian]]), but it introduces another incompatibility: `ext2fs` then only supports block sizes of 4096 bytes. Smaller block sizes are commonly automatically selected by `mke2fs` when using small backend stores, like floppy devices. #### IRC, freenode, #hurd, 2012-06-30 at least having the same api in the debian package and the git source would be great (in reference to the large store patch ofc) braunr: the api part could be merged perhaps it's very small apparently braunr: the large store patch is a sad story. when it was first submitted, one of the maintainers raised some concerns. the other didn't share these (don't remember who is who), but the concerned one never followed up with details. so it has been in limbo ever since. tschwinge once promised to take it up, but didn't get around to it so far. plus, the original author himself mentioned once that he didn't consider it finished... antrik: it's clearly not finished there are XXXs here and there it's called an RC1 and RC2 is mentioned in the release notes youpi: well, that doesn't stop most other projects from commiting stuff... including most emphatically the original Hurd code :-) what do you refer to my "that" ? :) "XXX" right at the time it made sense to delay applying but I guess by nowadays standard we should just as well commit it it works enough for Debian, already there is just one bug I nkow about the apt database file keeps haveing the wrong size, fixed by e2fsck youpi: remember that patch should be fixed in the offset declaration in diskfs.h I don't remember about that did we fix it in the debian package? nope you had issues when fixing it, didn't you? (I don't remember where I can find the details about this) i changed it, recompiled hurd and installed it, started a perl rebuild and when running one of the two lfs tests it hard locked the vm after ext2fs was taking 100% cpu for a bit i don't exclude i could have done something stupid on my side though or there could just be actual issues, uncovered here which can be quite probable ##### IRC, freenode, #hurd, 2013-03-19 youpi: i'm back on polishing the large store patch did you remember seeing something else than the bzero/memset out-of-scope changes ? (i mean, readily noticeable) I don't remember ok the original code already assumes mmap succeeds is it ok to consider the patch can do the same ? I'd say so ok youpi: actually, it looks like a good part of the patch isn't related to large stores for example, in ext2fs/inode.c, there are calls to dino_ref/dino_deref hum i'm not sure at all these have anything to do with handling large stores but dino_ref is introduced by this patch, isn't it? it replaces dino yes, it replaces it because the dino() approach can't work beyond 2GiB i see youpi: i'd like to replace the recursive call to disk_cache_block_ref with a goto, is that fine with you ? looks ok to me better than relying on tail recursion that's the idea :) #### [[libpager]] API change ##### IRC, freenode, #hurd, 2013-03-04 youpi: i don't remember exactly your answer when i asked about considering the ext2 large store patch for merging there's just an API change that it introduces but otherwise I'd say we should just do it ok I've just checked the API change again it's simply adding a notify_on_evict parameter and a pager_notify_evict callback yes I'd say we mostly need to polish this ah, there is the same parameter on diskfs_start_disk_pager ##### IRC, freenode, #hurd, 2013-04-23 and i'm working again on the ext2fs large store patch i finished separating the libpager interface change from the rest, as Thomas suggested, so a new version should be ready soon #### `EXT2FS_DEBUG` ##### IRC, freenode, #hurd, 2013-03-04 youpi: do we want EXT2FS_DEBUG defined upstream ? I don't really have an opinion on this stuffing it in the large store patch is not good of course I wonder whether we want it by default. it is currently defined by the patch (in the debian package i mean) I've just seen that yes i won't include it upstream, and if we decide to keep this behaviour, we can add a patch just for that or a define err a configure option ok #### IRC, freenode, #hurd, 2013-10-08 ogi: your ext2fs patches were finally merged upstream :) ## Sync Interval [[!tag open_issue_hurd]] ### IRC, freenode, #hurd, 2012-10-08 btw, how about we increase our ext2 sync interval to 30 seconds, like others do ? not really because others do it that way, but because it severely breaks performance on the hurd and 30 seems like a reasonable amount (better than 5 at least) That would be a nice improvement, but only after writeback throttling is implemented. ## Stripped vs. Unstripped `ext2fs.static` [[!tag open_issue_hurd]] ### IRC, freenode, #hurd, 2013-09-17 I always had some trouble with dropping a rebuild ext2fs.static into my test system and I never figured out why I just followed a hunch and stripped the binary, and all of the sudden it works any ideas why? teythoon: I quick search found me: and . tschwinge: ugh, thanks for the pointers ;) teythoon: They won't help too much I fear. Anyway, good intuition (or whatever) ;-) that you found this out. teythoon: Not exactly related to stripped/unstripped per se (that is, debug information), but in the past we've had an issue about relro (see binutils/glibc, ), where a variable (that erroneously happend to be in such a read-only section, if I remember correct) was tried to be modified -- which worked "sometimes": depending on where exactly it was located in the binary (which shifted around a page boundary by stripped/unstripped), it'd segfault or not. Burnt several days on that before Samuel (IIRC) eventually figured it out. tschwinge: well, thanks anyway ;) ## IRC, freenode, #hurd, 2014-02-11 task with pid 5 deallocating an invalid port 4622, most probably a bug. ext2fs yes, i've seen this e.g. when a passive translator starts i guess it is in libfshelp/translator-list.c ## Inode Sizes, Fragment and Block Sizes ### IRC, freenode, #hurd, 2014-02-12 this might be interesting and could make people not to fsck hurd filesystem on linux: start ext2fs: ext2fs: device:hd0s1 ? : panic: get_hypermetadata: inode size 256 isn't supported (wait, also a bad typist) well, if the file system was created from the hurd, or with -o hurd, as it ought to be, you wouldn't have this problem oh, good to know, especially before restoring :p i suspect your mkfs command to have created an ext4 fs nope mkfs.ext2 hm ok, so it seems to create 256 size inodes by default there i guess -o hurd would set some os-specific properties it merely enforces a few restrictions some predefined defaults fragments and blocks are 4k and apparently inodes are 128 bytes because it can't support bigger values? is it worth working on remove such restrictions? probably not so far certainly not the fragment/block size restriction it matches the page size larger inode sizes could be supported if they're dependencies for other worthwhile features such as those someone would add in an ext4 translator ## Linux' `CONFIG_EXT4_USE_FOR_EXT23` ### IRC, freenode, #hurd, 2014-02-12 why the hell i have thousands of Inode 839, i_blocks is 248, should be 256. Fix? yes in all cases i_blocks should be +8 and /dev/sda1: (There are 245635 inodes containing multiply-claimed blocks.) 10:50:08< gg0> start ext2fs: Hurd server bootstrap: ext2fs[device:hd0s1] exec That's exactly where my image boot hangs! start ext2fs: Hurd server bootstrap: ext2fs[gunzip:device:rd0] exec gnu_srs1: you might want to check that linux isn't using the ext4 module to handle ext2 and ext3 filesystems gnu_srs1: as I understand it the idea is that the ext4 module treats them as ext2/ext3 filesystems, just avoiding code duplication from having three separate modules for related filesystems, so it shouldn't change it from ext2 at all, but it does do something strange with it but I'm not sure if that's the case or if it's converting it to ext4. last I heard Hurd doesn't support anything beyond ext2 AliciaC: I did use ext2 when mounting from Linux: mount -t ext2 /dev/loop0 /mnt and when not mounted: e2fsck /dev/loop0 gnu_srs1: I'd check the kernel config to be sure, CONFIG_EXT4_USE_FOR_EXT23 must be disabled you can use the ext4 driver for ext2 that's not a problem here the problem happens long before, when the file system gets corrupted you must understand why I have done some testing on this, mounting a Hurd ext2 filesystem with the ext4 module broke it for me, an easily repeated issue mounting Debian's ext2 image and unmounting it with ext4 broke it, resulting precisely in the kind of hang ups mentioned by gnu_srs1 and gg0 interesting that's with a clean image with nothing corrupting it before hand, tested to be working as well ok so the ext4 driver must ignore hurd specific stuff that's strange because i recall using it to perform small repairs on darnassus and never had any issue even on the root file syste but my repairs were very quick and targetted different linux versions maybe when I was testing it I didn't even need to do anything in the filesystem to trigger the issue, just mount and unmount I repaired filesystems before like this, has something happened with later versions of Linux? One of my boxes is ext3 (probably worked before) another ext4 (the one breaking things, but worked before) ext3 and ext4 box: CONFIG_EXT4_USE_FOR_EXT23=y same kernel 3.12-1.amd64 what about mounting with bs=4096 (used by hurd) -t ext2 should work fine just don't use the ext4 driver if in doubt no difference between specifying -t or not, in both cases EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem hmm you're screwed then ; ;p or maybe -t ext3 .. :) although i suspect ext4 would be used then too linux-image-3.2.0-4-amd64: /lib/modules/3.2.0-4-amd64/kernel/fs/ext2/ext2.ko wheezy still has it. then something between 3.2.0 and 3.13(?) removed it check the config file i mean ext2 module check if the config file enables it It's not: # CONFIG_EXT2_FS is not set 14:42 < gg0> wheezy still has it. then something between 3.2.0 and 3.13(?) removed it how about retrying what you did without ever mounting from linux ? gg0: it wasn't clear enough that you meant removed from configuration (for example, it could have been blacklisted) or present not as a module maybe yes, although it's unusual to see generic kernels embedding file systems these days the CONFIG_EXT4_USE_FOR_EXT23 option isn't available if either ext2 or ext3 are enabled though, even just as loadable modules The ext2 and ext3 modules were there in 3.10-3, not in 3.12-1 (14:48:59) : It's not: # CONFIG_EXT2_FS is not set -- 3.12-1 https://bugs.debian.org/731072 * gg0 rsync'ing back to new fs with 3.10 kernel seems like this bug was archived without being closed?? someone should produce a testcase and file another one btw but that bug was for files systems up to 4MB, not 4GB? i pasted it just because submitter talks about config option in question and when was enabled don't we want to thank AliciaC who pointed it out and who could precisely file a bug? :) filed http://bugs.debian.org/738758 gg0: thanks AliciaC: and thanks too ### IRC, freenode, #hurd, 2014-02-13 gg0: Did you create and test with an ext2 Linux image too on 3.10/3.12? here is a diff: http://paste.debian.net/81837/ visible differences: Filesystem features:filetype (linux only) and Free inodes:1268(hurd) / 1269(linux) between one created with -o Hurd and one created with -o Linux (or no -o)? AliciaC: -o Hurd and -b 4096 (no -o) I wonder if that would show any interesting difference between an untouched -o Hurd ext2 image and a copy of it that has been mounted with the ext4 module AliciaC: here: http://paste.debian.net/81857/ there is a difference of one in the number of free inodes! cf the number of free inodes for linux gnu_srs: thanks :) though I don't know what to make of that, I guess just adding an inode shouldn't break anything wait, no, removing an inode? bleh, too tired, read it wrong this line should read:(11:37:48) srs: visible differences: Filesystem features:filetype (linux only) and Free inodes:1268(linux) / 1269(hurd) There are differences in ext2.h and ext4.h in the Linux source code wrt hurd1, hurd2 structs. one change might be interesting: http://paste.debian.net/81864/ gnu_srs: probably not If not, where to look? well, the first thing would be to create a (small) ext2 file system, usable on the hurd, with a few files and directories save it mount it with the ext4 driver and make a binary comparison you could use a modified ext2fs translator to tell you exactly what's wrong when loading the file system and then look at the corresponding code in the ext4 driver braunr: here is a binary diff of the unmounted and mounted e2fs files: http://paste.debian.net/81896/ gnu_srs1: i'm not going to analyze it you are :p many of them can be removed: e.g. /mnt and bug000 ? many diff entries* but why ? you shouldn't have changed the content at all If I don't add a file, the fs is not corrupted this is with two vers small files created as in gg0s bug report very* ok i guess checking the source code first and the binary diffs next is easier OK, I have to find out how the ext2fs files are organized. I.e. reading mke2fs source code no read the ext4 driver how a directory entry is created how a directory is saved back on the block device how any potential conversion could be triggered k, will do read about the ext2fs format if doing that first doesn't help learning a file system is complicated and long What is the inode size for Hurd/Linux? probably 128 same for both? what is "Hurd/Linux" ? on Hurd / on Linux 128 on hurd, variable on linux 128-512 i'd say ext2 on linux found it from dumpe2fs: 128 for both no, it can vary on linux although once a file system is built, the inode size cannot be changed k, the file created with mke2fs has 128 ### IRC, freenode, #hurd, 2014-03-10 hi. I'm having problems with copying directory from host machine to hurd image. I mount hurd image at host and than use "cp -r" to copy directory. Then I unmount image and start qemu. When I try to see contents of the directory I get error "Computer bought the farm". mcsim: are you using the ext4 driver from linux ? I use image debian-hurd-20140211.img from if so, avoid it ok i'll try braunr: do I have to compile module on my own? because modprobe ext2 && lsmod | grep ext2 give no output? maybe mcsim: what kernel are you using ? 3.12 oh braunr: what is wrong with it? grep 'EXT[234]' /boot/config* it probably uses ext4 for ext2 and ext3 and i don't think it's possible to simply load the ext2fs module because the options are mutually exclusive iirc # CONFIG_EXT2_FS is not set is there another way to copy data? probably not (check for CONFIG_EXT4_USE_FOR_EXT23) mcsim: install 3.10 http://snapshot.debian.org/package/linux/3.10.11-1/#linux-image-3.10-3-686-pae_3.10.11-1 https://bugs.debian.org/738758 assuming host is debian gg0: thank you * gg0 redirects thanks to AliciaC who caught it gg0: thanks :) ## `ext2fs: ../../ext2fs/pager.c:401: file_pager_write_page: Assertion 'block' failed.` ### IRC, freenode, #hurd, 2014-02-19 "ext2fs: ../../ext2fs/pager.c:401: file_pager_write_page: Assertion 'block' failed." in the console. [[user/Maksym_Planeta]] also has hit that one. wow oO using debian hurd right ? power cycling. yes. with hurd 1:0.5.git20140203-1 and glibc 2.17-98~1 ? braunr: not sure how to check. pere: dpkg -l | grep .. i suppose gah, autofsck do not work.. :( it does :( unstable is easy to mess it seems had to run fsck -y / manually... i suspect you were using a corrupted file system at mount time ah that yes it is sometimes needed but ext2 is reliable enough that only temporary files get their way into lost+found temporary/recently created the crash you had, on the other hand, looks more serious it seems like you mounted a corrupted file system could be. hurd v1:0.5.git20140203-1 and libc0.3 v2.17-98~1, it seem. good you shouldn't have such problems then, i suspect a mess up on your part but you're not the only one to have had weird file systems problems lately hah. I blame the hurd. :P heh :) gah, another crash. :( Oo same assertion ? same place, or almost the same place. yes. hm same crash. :( what kind of machine do you run the hurd on ? kvm how much memory ? 1G did you see if the system was swapping ? no idea. i suggest always running top/htop on the hurd ;p and monitor memory usage closely unless pere lately mounted/fsck'ed fs in question with a recent linux kernel, there should not be particular problems it definitely doesn't look like it was mounted by an ext4 driver, no which means it's something else entirely and this is scary I didn't. I fetched the prebuild image, upgraded it, switched it to sysvinit and started working. sorry i can't be of more help about that ext2fs has been quite solid on my machines for a long time :( there are known assertions that trigger under some special pressure, but that's not what you're having here pere: anything particular in fstab ? nope, have not touched /etc/fstab. hm stupid question are you sure it's not full ? nothing look full to me. neither the disk nor the host file system. ### IRC, freenode, #hurd, 2014-02-20 braunr: do you remember my ext2fs crash from yesterday? I could avoid it by interrupting the triggering build and running sync once in a while. and it show up again if I do not sync in between. :) ? are you sure you're not swapping ? I have no idea. still. :) again, i recommend you run top/htop and monitor that pere: is your patch needed to trigger the assertion ? [[open_issues/ti-rpc_then_nfs]]. braunr: well, without it, the package do not build, so yeah. :) ok tested again, and is not swapping. 850MB free memory. ok so this might be a real file system bug let me see pere: libtirpc built fine here .. pere: do you have a separate /home partition ? or any separate file system for builds braunr: nope, everything on / pere: i wouldn't recommend that there very probably are bugs in the file system code and using separate partitions is a way to alleviate them ## `ext2fs: ../../libdiskfs/rdwr-internal.c:42: _diskfs_rdwr_internal: Assertion `!diskfs_readonly' failed.` ### IRC, freenode, #hurd, 2014-02-22 login: init: notifying pfinet of shutdown...init: notifying tmpfs none of shutdown...init: notifying tmpfs none of shutdown...init: notifyi. ext2fs: ../../libdiskfs/rdwr-internal.c:42: _diskfs_rdwr_internal: Assertion `!diskfs_readonly' failed. In tight loop: hit ctl-alt-del to reboot # Documentation * *