lkml.org 
[lkml]   [2006]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    SubjectRe: NFS and partitioned md
    On Tuesday June 27, bugtraq@smoula.net wrote:
    > Hi,
    >
    > thx for your interrest,
    >
    > Neil Brown píše v Út 27. 06. 2006 v 10:32 +1000:
    > > Odd. It works fine for me (I've had this sort of configuration on
    > > some machines for ages, and I just tested a bleeding edge kernel and
    > > it still works).
    > >
    > > So I suspect there is something else going on that has nothing to do
    > > with the usage of partitioned md.... then again, maybe there is some
    > > weird sign extension happening to '254' somewhere, though that would
    > > be terribly strange.
    > >
    > > So: details please.
    > > What md device exactly (major and minor)
    > # mount | grep /mnt/data
    > /dev/md_d64p9 on /mnt/data type ext3 (rw)
    > /dev/loop/0 on /mnt/data-loop type ext3 (rw)
    >
    > # ls -al /dev/md_d64p9
    > brw-rw---- 1 root disk 254, 4105 2006-06-27 10:17 /dev/md_d64p9
    > # ls -al /dev/loop0
    > lrwxrwxrwx 1 root root 6 2006-06-27 19:44 /dev/loop0 -> loop/0
    > # ls -al /dev/loop/0
    > brw-rw---- 1 root disk 7, 0 2006-06-27 19:45 /dev/loop/0
    >
    > (as I look on that it comes on my mind, that problem could be minor
    > longer than 1 byte)
    >

    Exactly. 4105 > 256. Such devices need a different format filehandle
    which didn't work until very recently due to a bug (obviously no-one
    tried it until recently).

    The patch below fixes the kernel so that this will work.
    Alternately use md_d0 md_d1, md_d2, or md_d3. Then it will work with
    no patches.

    NeilBrown

    -----------------------------
    Fixing missing 'expkey' support for fsid type 3

    From: Frank Filz <ffilzlnx@us.ibm.com>

    Type '3' is used for the fsid in filehandles when the device number
    of the device holding the filesystem has more than 8 bits in either
    major or minor.
    Unfortunately expkey_parse doesn't recognise type 3. Fix this.

    (Slighty modified from Frank's original)

    Signed-Off-By: Frank Filz <ffilzlnx@us.ibm.com>
    Signed-off-by: Neil Brown <neilb@suse.de>

    ### Diffstat output
    ./fs/nfsd/export.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff .prev/fs/nfsd/export.c ./fs/nfsd/export.c
    --- .prev/fs/nfsd/export.c 2006-06-29 11:07:21.000000000 +1000
    +++ ./fs/nfsd/export.c 2006-06-27 18:27:49.000000000 +1000
    @@ -126,7 +126,7 @@ static int expkey_parse(struct cache_det
    if (*ep)
    goto out;
    dprintk("found fsidtype %d\n", fsidtype);
    - if (fsidtype > 2)
    + if (key_len(fsidtype)==0) /* invalid type */
    goto out;
    if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)
    goto out;
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2006-06-29 05:52    [W:0.023 / U:0.832 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site