Re: Reiser4 und LZO compression
On Sun, 27 Aug 2006 04:34:26 +0400 Alexey Dobriyan [EMAIL PROTECTED] wrote: The patch below is so-called reiser4 LZO compression plugin as extracted from 2.6.18-rc4-mm3. I think it is an unauditable piece of shit and thus should not enter mainline. Like lib/inflate.c (and this new code should arguably be in lib/). The problem is that if we clean this up, we've diverged very much from the upstream implementation. So taking in fixes and features from upstream becomes harder and more error-prone. I'd suspect that the maturity of these utilities is such that we could afford to turn them into kernel code in the expectation that any future changes will be small. But it's not a completely simple call. (iirc the inflate code had a buffer overrun a while back, which was found and fixed in the upstream version).
Re: Reiser4 und LZO compression
On 8/27/06, Andrew Morton [EMAIL PROTECTED] wrote: On Sun, 27 Aug 2006 04:34:26 +0400 Alexey Dobriyan [EMAIL PROTECTED] wrote: The patch below is so-called reiser4 LZO compression plugin as extracted from 2.6.18-rc4-mm3. I think it is an unauditable piece of shit and thus should not enter mainline. Sheesh. Like lib/inflate.c (and this new code should arguably be in lib/). The problem is that if we clean this up, we've diverged very much from the upstream implementation. So taking in fixes and features from upstream becomes harder and more error-prone. Right. How about putting it in as so that everyone can track divergences, but to not use it for a real compile. Rather, consider it meta-source, and do mechanical, repeatable transformations only, starting with something like: mv minilzo.c minilzo._c cpp 2/dev/null -w -P -C -nostdinc -dI minilzo._c minilzo.c lindent minilzo.c to generate a version that can be audited. Doing so on a version of minilzo.c google found on the web generated something that looked much like any other stream coder source I've read, so it approaches readability. Of a sorts. Further cleanups could be done with cpp -D to rename some of the more bizarre symbols. Downside is that bugs would have to be fixed in the 'meta-source' (horrible name, but it's late here), but at least they could be found (potentially) easier than in the original. Ray
Possible bug with FIBMAP
Hi Two users of a hack I wrote told me that http://vleu.net/shake/fb_r4.c (also attached with the mail) returned FIBMAP=-22, FIGETBSZ=4096 on some of their files on reiser4 filesystems. Does this value of -22 have a special meaning (would be strange), or is it a bug in Reiser4 ? I can ask them for more details, if you want. Thanks Brice /* * Non released test software, distributed under GPL-2 licence by * Brice Arnould (c) 2006 * You shouldn't use it. */ #include stdio.h #include assert.h // assert() #include errno.h // errno #include error.h // error() #include sys/ioctl.h // ioctl() #include linux/fs.h // FIBMAP, FIGETBSZ #include sys/types.h // open() #include sys/stat.h // open() #include fcntl.h // open() int main (int argc, char **argv) { int fd, blocksize, block = 0; if (1 != argc) error (1, 0, usage : %s FILE, argv[0]); fd = open (argv[1], O_RDONLY); assert (0 fd); if (-1 == ioctl (fd, FIGETBSZ, blocksize) || -1 == ioctl (fd, FIBMAP, block)) error (1, 0, ioctl() failed, are you root ?\n); printf (FIBMAP=%i, FIGETBSZ=%i\n, block, blocksize); close (fd); }
Re: Reiser4 und LZO compression
Andrew Morton wrote: On Sun, 27 Aug 2006 04:34:26 +0400 Alexey Dobriyan [EMAIL PROTECTED] wrote: The patch below is so-called reiser4 LZO compression plugin as extracted from 2.6.18-rc4-mm3. I think it is an unauditable piece of shit and thus should not enter mainline. Like lib/inflate.c (and this new code should arguably be in lib/). The problem is that if we clean this up, we've diverged very much from the upstream implementation. So taking in fixes and features from upstream becomes harder and more error-prone. Well, what kinds of changes have to happen? I doubt upstream would care about moving some of it to lib/ -- and anyway, reiserfs-list is on the CC. We are speaking of upstream in the third party in the presence of upstream, so... Maybe just ask upstream?
Re: Possible bug with FIBMAP
-22 is EINVAL, or an invalid argument. Your file descriptor is invalid, as proved by the assert(). Ivan... On 8/27/06, Brice Arnould [EMAIL PROTECTED] wrote: Hi Two users of a hack I wrote told me that http://vleu.net/shake/fb_r4.c (also attached with the mail) returned FIBMAP=-22, FIGETBSZ=4096 on some of their files on reiser4 filesystems. Does this value of -22 have a special meaning (would be strange), or is it a bug in Reiser4 ? I can ask them for more details, if you want. Thanks Brice
Re: Possible bug with FIBMAP
Never mind, I misread the assert. :) Ivan... On 8/27/06, Ivan Pulleyn [EMAIL PROTECTED] wrote: -22 is EINVAL, or an invalid argument. Your file descriptor is invalid, as proved by the assert(). Ivan... On 8/27/06, Brice Arnould [EMAIL PROTECTED] wrote: Hi Two users of a hack I wrote told me that http://vleu.net/shake/fb_r4.c (also attached with the mail) returned FIBMAP=-22, FIGETBSZ=4096 on some of their files on reiser4 filesystems. Does this value of -22 have a special meaning (would be strange), or is it a bug in Reiser4 ? I can ask them for more details, if you want. Thanks Brice
Alarm Sistemi 119YTL
KDV dahil 119 YTL'ye Kablosuz Alarm Sistemi... www.alarmatik.com