2008-08-17 00:00 now lets see if printk has it 2008-08-17 00:00 set it up where? 2008-08-17 00:00 @tux3.org? 2008-08-17 00:01 if you move it you'd have re-subscribe all the members 2008-08-17 00:01 sounds like a pita 2008-08-17 00:03 true 2008-08-17 00:03 printk has %t 2008-08-17 00:03 so maybe we should use it on the use every feature principle 2008-08-17 00:04 whats %t? 2008-08-17 00:05 difference of pointers :p 2008-08-17 00:05 does printf? 2008-08-17 00:06 also 2008-08-17 00:09 http://lxr.linux.no/linux+v2.6.26.2/lib/vsprintf.c#L779 2008-08-17 00:09 -!- flips(~phillips@phunq.net) has left #tux3 2008-08-17 00:09 -!- flips(~phillips@phunq.net) has joined #tux3 2008-08-17 00:10 http://lxr.linux.no/linux+v2.6.26.2/lib/vsprintf.c#L779 <- the documentation for printk 2008-08-17 00:11 ah i see 2008-08-17 00:11 yes we should be using that 2008-08-17 00:11 perfect 2008-08-17 00:13 finally 2008-08-17 00:13 i've always wanted to read the printf man page to see all the features i never use 2008-08-17 00:13 this is a good reason to do so 2008-08-17 00:14 uhoh 2008-08-17 00:15 ? 2008-08-17 00:16 nice no compile warnings on 64 2008-08-17 00:17 %ti does make more sense than %tu 2008-08-17 00:17 in case of an error it will be easy to see the negative value then 2008-08-17 00:18 right 2008-08-17 03:06 -!- pgquiles(~pgquiles@132.Red-217-125-199.dynamicIP.rima-tde.net) has joined #tux3 2008-08-17 06:38 morning pgquiles 2008-08-17 06:39 hey flips 2008-08-17 06:40 a little early for here 2008-08-17 06:44 what time is it over there? 2008-08-17 06:44 6:45 2008-08-17 06:44 that hurts :-) 2008-08-17 06:45 yup 2008-08-17 06:45 gotta get some more zzz's 2008-08-17 06:45 see all the tux3 checkins 2008-08-17 06:45 shapor got another patch, 3rd or 4th I think 2008-08-17 06:46 did a Jos van den Oever write you? 2008-08-17 06:46 he's the guy developing Strigi 2008-08-17 06:52 not yet 2008-08-17 06:53 he'll eventually do 2008-08-17 06:54 getting indexing working well for kde would please me 2008-08-17 06:55 me too :-) 2008-08-17 06:55 anyway, strigi is not tied to kde 2008-08-17 06:56 even better 2008-08-17 06:56 but kde will use it early I suppose 2008-08-17 06:56 yes, it is already using it 2008-08-17 06:57 in 4.0 and 4.1 you need to explicitly enable it but in 4.2 will be enabled by default 2008-08-17 06:57 ACTION loves kde 2008-08-17 06:57 flips: there's Camp KDE in January in Jamaica, you know :-) 2008-08-17 06:57 wow, even more south than I already am 2008-08-17 06:58 I will keep it in mind 2008-08-17 06:59 I'm going to sleep one hour, I still need to recover from aKademy 2008-08-17 06:59 see you later 2008-08-17 06:59 bye 2008-08-17 11:56 -!- pgquiles_(~pgquiles@126.Red-80-39-172.dynamicIP.rima-tde.net) has joined #tux3 2008-08-17 13:42 ACTION goes wacks tree_expand into 2 big pieces 2008-08-17 13:43 typos galor 2008-08-17 13:54 whacking completed 2008-08-17 13:54 now to make it make sense 2008-08-17 13:58 7 parameters for insert_child now down to 6... 2008-08-17 15:14 iattr.c coming soon 2008-08-17 15:14 you think perhaps a dir should contain a default file attr entry? 2008-08-17 15:15 yes for sure 2008-08-17 15:15 in most cases dirs contain very similar files 2008-08-17 15:15 and be inherited instead of storing the same attr in each inode 2008-08-17 15:15 exactly 2008-08-17 15:15 inode attrs come in groups 2008-08-17 15:15 one of the groups is ctime/mode/uid/guid 2008-08-17 15:15 the "create" group 2008-08-17 15:16 that one can usually be inherited except for ctime 2008-08-17 15:16 well 2008-08-17 15:16 so, break out the ctime 2008-08-17 15:16 so there is maybe two flavors of the create group 2008-08-17 15:16 ctime only and ctime plus ownership 2008-08-17 15:17 it might be ok to always separate them 2008-08-17 15:17 a version and a 4 bit attr type field have to go in each attr 2008-08-17 15:18 so: struct ctime { u64 kind:4, version:10, time: 50 }; 2008-08-17 15:20 and struct owner { u64 kind:4, version:10, mode: 50, uid:32, gid:32 }; 2008-08-17 15:20 8 bytes for the first, 16 bytes for the second 2008-08-17 15:21 16 bytes saved every time it is possible to inherit the owner from the directory 2008-08-17 15:21 which is something like 99.9% of the time on my system I think 2008-08-17 15:25 ACTION just wrote a sick one-liner to determine the average number of different file perms a directory contains 2008-08-17 15:26 here is the distribution from my web server: 2008-08-17 15:26 651 0 2008-08-17 15:26 4318 1 2008-08-17 15:26 92 2 2008-08-17 15:26 8 3 2008-08-17 15:26 4 4 2008-08-17 15:27 so, 651 directories with no files in them, 4318 with only one set of perms on the files contained in it 2008-08-17 15:27 92 with 2, etc 2008-08-17 15:27 aka, output of: 2008-08-17 15:27 find / -xdev -type d -exec sh -c 'ls -l $1 | awk "/^\-/ {print \$1}" | sort -u |wc -l' {} {} \; | sort | uniq -c 2008-08-17 15:38 across the entire filesystem there are only 30 unique permissions settings 2008-08-17 15:38 only about 500k files 2008-08-17 15:38 nice observation 2008-08-17 15:38 s/only/on/ 2008-08-17 15:38 so there should be owner atoms? 2008-08-17 15:38 or sorry 2008-08-17 15:38 permission atoms 2008-08-17 15:40 above, 4318 out of 6000 files save 16 bytes 2008-08-17 15:41 running on my system 2008-08-17 15:41 those are directories 2008-08-17 15:41 not files 2008-08-17 15:41 right 2008-08-17 15:41 directories have attrs just like files, I'm getting a sense of overall saving 2008-08-17 15:42 ah 2008-08-17 15:42 considering just files, what is the single permissions percentage? 2008-08-17 15:43 you mean, how many files live in directories with only one set of permissions? 2008-08-17 15:43 this is also a fun one to run: 2008-08-17 15:43 find / -xdev -printf "%m\n" 2>/dev/null| sort | uniq -c| sort -n 2008-08-17 15:44 out of 53972 files, only 24 unique permissions sets 2008-08-17 15:44 41605 files are mode 644 2008-08-17 15:46 talking] 2008-08-17 15:49 39537 files live in directories with only one set of permissions 2008-08-17 15:52 its total brain damage to store 0644 all over the filesystem 2008-08-17 15:58 ACTION keeps getting more excited about tux3 2008-08-17 16:01 flips: where did "16 bytes" come from? 2008-08-17 16:02 each set of permissions is only 12 bits 2008-08-17 16:02 struct owner { u64 kind:4, version:10, mode: 50, uid:32, gid:32 }; 2008-08-17 16:02 they come in groups 2008-08-17 16:02 oh 2008-08-17 16:02 i see 2008-08-17 16:02 they have to be discriminated for traversal and versioned 2008-08-17 16:02 that is why putting them in groups is a win 2008-08-17 16:03 mode:50 ? 2008-08-17 16:03 some extra ;-) 2008-08-17 16:03 at this point I am trying to preserve 8 byte granularity 2008-08-17 16:03 I am not sure if that matters 2008-08-17 16:03 i see 2008-08-17 16:03 I can go to byte aligned and save more space 2008-08-17 16:03 probably the right thing to do actually 2008-08-17 16:04 but it is a detail of iattr.c 2008-08-17 16:04 thats a lot of extra mode bits 2008-08-17 16:04 why? 2008-08-17 16:04 struct owner { u64 kind:4, version:10, mode: 16, pad: 36, uid:32, gid:32 }; 2008-08-17 16:04 ok? 2008-08-17 16:05 oh i guess we should support "chattr" 2008-08-17 16:05 struct owner { u64 kind:4, version:10, mode:16, pad:4, uid:32, gid:32 }; <- 12 bytes] 2008-08-17 16:05 um 2008-08-17 16:05 I'm on drugs 2008-08-17 16:06 16 bytes 2008-08-17 16:06 so you were right, :50 was just silly 2008-08-17 16:06 chattr must be supported of course 2008-08-17 16:06 how many bits does chattr need 2008-08-17 16:06 chattr the command? 2008-08-17 16:07 yeah 2008-08-17 16:07 ioctl(3, EXT2_IOC_GETFLAGS, 0x7fff16bffeec) = 0 2008-08-17 16:08 struct owner { u64 kind:4, version:10, mode:20, uid:32, gid:32 }; <- 12 bytes] 2008-08-17 16:08 20 mode bits should do it 2008-08-17 16:08 we need to support that interface 2008-08-17 16:09 how does that work with the vfs layer 2008-08-17 16:09 http://lxr.linux.no/linux+v2.6.26.2/include/linux/ext2_fs.h#L200 2008-08-17 16:09 http://lxr.linux.no/linux+v2.6.26.2/+ident=11795060 2008-08-17 16:11 ext2 has 22 of its own per file flags, mostly bullshit 2008-08-17 16:11 unused 2008-08-17 16:11 things like compression 2008-08-17 16:12 tail packing 2008-08-17 16:12 #define EXT2_INDEX_FL FS_INDEX_FL /* hash-indexed directory */ <- one of the few that actually got implemented (by me) 2008-08-17 16:12 heh 2008-08-17 16:13 anyway, we will divide them into commonly used flags that go in the 20 mode bits and rare ones that go in some other attribute type 2008-08-17 16:14 16 basic attribute types should be enough 2008-08-17 16:14 one of those types is "extended attribute" 2008-08-17 16:14 ok 2008-08-17 16:14 well there are only 8 spare mode bits 2008-08-17 16:15 not counting chattr 2008-08-17 16:15 i was just trying to figure out how many chattr needed 2008-08-17 16:15 ACTION does man chattr 2008-08-17 16:15 not very many I think 2008-08-17 16:16 ----------------- /tmp 2008-08-17 16:16 thats a lot of dashes (output from lsattr) 2008-08-17 16:17 98% of your files could inherit struct owner from parent directory 2008-08-17 16:17 just crunched it 2008-08-17 16:17 my system is: 2008-08-17 16:17 4113 0 2008-08-17 16:17 16326 1 2008-08-17 16:17 419 2 2008-08-17 16:17 20 3 2008-08-17 16:17 8 4 2008-08-17 16:17 3 5 2008-08-17 16:17 1 7 2008-08-17 16:18 yeah 2008-08-17 16:18 my system is 97.3 2008-08-17 16:19 % 2008-08-17 16:19 probably rarely under 90% 2008-08-17 16:19 you are 97.7 actually 2008-08-17 16:19 even on multiuser systems 2008-08-17 16:19 you are 97.6 actually 2008-08-17 16:19 true 2008-08-17 16:19 its rare to work in the same directory as another user 2008-08-17 16:20 that is 261K of kernel cache saved for full stat 2008-08-17 16:20 on my system 2008-08-17 16:20 which is not particularly big fs 2008-08-17 16:21 man ls -lR is fucking slow 2008-08-17 16:21 ddtree is fscking fast ;-) 2008-08-17 16:22 it stats /etc/localtime for EVERY file ?? 2008-08-17 16:22 bleah 2008-08-17 16:22 work of the fsf unfortunately 2008-08-17 16:27 http://lxr.linux.no/linux+v2.6.26.2/fs/ext2/inode.c#L1147 <- ext2_set_inode_flags 2008-08-17 16:28 total of 10 flags 2008-08-17 16:28 per inode 2008-08-17 16:28 almost all seem sensible 2008-08-17 16:31 struct owner { u64 kind:4, version:10, mode:18, uid:32, gid:32 }; <- 12 bytes 2008-08-17 16:31 too tight maybe 2008-08-17 16:32 unless mode is an atom 2008-08-17 16:32 anyway bask to inums 2008-08-17 20:38 -!- tux3bot(~tux3bot@yzf.shapor.com) has joined #tux3 2008-08-17 20:41 -!- shapor(~shapor@yzf.shapor.com) has joined #tux3 2008-08-17 21:38 tuxkey_t *next_key(struct treepath *path, int levels) 2008-08-17 21:38 { 2008-08-17 21:38 for (int level = levels; --level < 0; ) 2008-08-17 21:38 if (!finished_level(path, level)) 2008-08-17 21:38 return &path[level].next->key; 2008-08-17 21:38 return NULL; 2008-08-17 21:38 } 2008-08-17 21:39 shapor, how does it look/ 2008-08-17 21:40 ok? 2008-08-17 21:42 flips: that doesn't seem very complex 2008-08-17 21:43 just looks up the path until it finds a level where we haven't read all the way to the end of the index block yet 2008-08-17 21:44 there we find a key that separates the subtree we are in (a leaf) from the next subtree to the right 2008-08-17 21:45 yeah i was able to read the c, you dont need to put that in a comment ;) 2008-08-17 21:45 just wondering why you were pasting it 2008-08-17 21:45 aw, I was just doing that ;-) 2008-08-17 21:45 because I haven't tested it 2008-08-17 21:45 heh 2008-08-17 21:45 it's part of the inode table block insertion stuff 2008-08-17 21:46 oh 2008-08-17 21:46 i dont know how that all fits together 2008-08-17 21:46 knowing the successor key tells us whether we should advance to the next block to search it or insert a new one, becauase the successor block is too far away in key space 2008-08-17 21:46 i think you described it in a post recently 2008-08-17 21:46 or no 2008-08-17 21:48 not in that detail 2008-08-17 21:48 and not everybody will be able to see the purpose from the code, so I put in the comment 2008-08-17 21:53 this function the way it is written can actually replace a nasty little bit of code in the delete, because it returns a pointer 2008-08-17 21:53 instead of the key 2008-08-17 21:53 in the delete, we have to find that successor key and change it 2008-08-17 21:57 i was thinking about the size and mtime 2008-08-17 21:57 do we have to update those? 2008-08-17 21:57 yes 2008-08-17 21:57 every time the file changes 2008-08-17 21:57 with a little bit of slop 2008-08-17 21:57 definitely on every fsync 2008-08-17 21:58 this is a job for the log of course 2008-08-17 21:58 tuxkey_t *p = next_key(path, levels), next = p ? *p : MAX_INODES; <- obscure enough? 2008-08-17 21:59 no i like it 2008-08-17 21:59 makes perfect sense 2008-08-17 22:00 traditionalists have trouble with C code like that 2008-08-17 22:00 then they need to be reminded that C99 was last millenium already 2008-08-17 22:00 doesn't work though 2008-08-17 22:01 a lot of folks are still scared of structure assignment 2008-08-17 22:01 let along inline decls 2008-08-17 22:01 let alone 2008-08-17 22:01 what doesnt work 2008-08-17 22:01 it doesn't work to remind them 2008-08-17 22:01 oh 2008-08-17 22:01 traditionalists are like that 2008-08-17 22:02 it is convenient that the maximum inodes and maximum blocks of a filesystem are the same 2008-08-17 22:02 that means there is a density of one inode per block 2008-08-17 22:02 howso 2008-08-17 22:03 which is convenient for deciding which inum to use 2008-08-17 22:03 over time with deletes that nice simple relationship deteriorates 2008-08-17 22:03 then we need other mojo 2008-08-17 23:04 flips: why are some of the data structures in the c files and some in tux3.h? 2008-08-17 23:13 because me being lame 2008-08-17 23:13 the c files are included 2008-08-17 23:13 like header files 2008-08-17 23:13 this is only for while it's in heavy hack mode 2008-08-17 23:14 when everything has to be declared twice it gets in the way of quick refactoring 2008-08-17 23:21 so struct inode is just from ext2 i guess? 2008-08-17 23:21 vfs 2008-08-17 23:22 with version added ? 2008-08-17 23:22 generic inode has version, yes, it is a different, bogus version 2008-08-17 23:22 stupid misnamed field 2008-08-17 23:22 i see 2008-08-17 23:23 it is really a change counter 2008-08-17 23:23 ah 2008-08-17 23:23 so that ext2/3 knows when it has to go look in the directory in case the entry it was positioned on was deleted 2008-08-17 23:23 it is that specific 2008-08-17 23:23 calling that a version was a heinous crime 2008-08-17 23:28 i'll just ignore it ;) 2008-08-17 23:29 it gets used in dir.c for revalidate, nowhere else 2008-08-17 23:36 causes running inode.c to fail 2008-08-17 23:36 what does? 2008-08-17 23:39 er i thought i pasted the assert 2008-08-17 23:40 whoops 2008-08-17 23:40 [10869] probe: Failed assertion "(ops->leaf_sniff)(sb, buffer->data)" 2008-08-17 23:41 that's fresh out of repository? 2008-08-17 23:42 maybe you have to give a filename on the command line? 2008-08-17 23:42 ah 2008-08-17 23:42 not a good error message to be sure 2008-08-17 23:42 yeah, my bad 2008-08-17 23:43 woo, it really tries hard even when it has no backing file 2008-08-17 23:44 I wonder if this is good 2008-08-17 23:45 generated 32 bitmap blocks, that is not good behaviou 2008-08-17 23:45 behavior 2008-08-17 23:46 [18006] main: Bitmap flush failed (Bad file descriptor) <- this is nice 2008-08-17 23:47 fd '(null)' = -1 (0xffffffff bytes) <- this maybe not so nice 2008-08-17 23:49 sb->image.blocks has a wierd number when fd is -1 2008-08-17 23:51 it's strange that printf doesn't support signed hexadecimal 2008-08-17 23:54 ok, fdsize64 now returns zero when it fails, better than overloading the size with -1, or maybe not 2008-08-17 23:54 anyway, inode.c then proceeds to fail on the leaf 2008-08-17 23:54 I wonder if those failure paths are decent 2008-08-17 23:55 probe needs to fail and not think it got a leaf 2008-08-17 23:55 hrm signed hex 2008-08-17 23:56 makes sense to me 2008-08-17 23:56 i suppose 2008-08-17 23:57 why doesn't fdsize64 just take a u64* 2008-08-17 23:57 it should 2008-08-17 23:57 and return err 2008-08-17 23:57 I thought I made it do that 2008-08-17 23:57 but the patch probably got danked 2008-08-17 23:57 like the ioctl does