Such a header is a valid old format quota.user as well, 2.2.0 kernel would
happily assume it is the old format and do bad things with that.
I was trying to explain that the only way I'm aware of how to force old
kernel not to touch new format file is to make its size not be divisible by
sizeof(struct dqblk). On the other side, it does not make much sense to me
to have the file format in both endian versions. Then kernel would have to
swap it if it plays with other format type, but not swap it if it is the
same endian. Look at UFS code how it sucks because UFS is both little and
big endian. On the other side, doing cpu_to_le32() does not hurt anybody,
especially on quota code.
So I'd more think in terms of
quota_header: id 8 bytes (some magic number)
version 2 bytes
and after it n times
bhard 4 bytes
bsoft 4 bytes
bcur 4 bytes
ihard 4 bytes
isoft 4 bytes
icur 4 bytes
btime 8 bytes
itime 8 bytes
as it is always read by read(2) or written by write(2), it does not matter
much that the structures in the file are not aligned on 8 bytes boundary.
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.2.5 on a sparc64 machine (3958.37 BogoMips)
___________________________________________________________________
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/