[lkml]   [1999]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectQuota file format [2.3 issue]

    I recently realized the format of quota.user and is both endian
    and archsize dependant. I think that's very wrong, because when you have a
    nicely portable ext2 filesystem on some disk and you want to move it to
    another computer, you loose if you have quotas on it (in the best case
    quotaon will not succeed and you won't have quotas on it, in the worst case
    it will succeed and do strange things, you'll probably loose all your quota
    information etc.).
    Sparc64 solves this by doing userland format translation in quota utilities,
    but that means it is not even possible to exchange quota enabled disks
    between 32bit and 64bit SPARC boxes.
    Now, what do you think about starting to use a new quota.user/
    format in 2.3, which will be both endian independent and will use 64bit
    values for timestamps in it (ie. change similar to old/new swap style)?
    It would probably not need many kernel changes in dquot.c.
    One problem is quota.user is completely header-less and in its whole size
    contains data which can have any value, so it is not easy to distinguish old
    format from some new one. The only thing which comes to my mind is file
    size: current kernel requires quota.user (group) to be non-zero size and
    some multiple of struct dqblk size. That's for sure divisible by 4. So what
    about if we attach a 10 byte header before the whole data lot, which will
    include some magic number and format version, so that's its extensible and
    then follow it by lets say little endian structures with 64bit times.
    That would mean the size of the file is always some multiple of 4 plus 2,
    hence the kernel and utilities can easily find out.


    Jakub Jelinek | |
    Administrator of SunSITE Czech Republic, MFF, Charles University
    UltraLinux | |
    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
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:51    [W:0.019 / U:119.552 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site