31 Mar, 2011

1 commit


12 Aug, 2010

2 commits

  • Implement the ability for the root directory of a mounted AFS filesystem to
    accept lookups of arbitrary directory names, to interpet the names as the names
    of cells, to look the cell names up in the DNS for AFSDB records and to mount
    the root.cell volume of the nominated cell on the pseudo-directory created by
    lookup.

    This facility is requested by passing:

    -o autocell

    to the mountpoint for which this is desired, usually the /afs mount.

    To use this facility, a DNS upcall program is required for AFSDB records. This
    can be obtained from:

    http://people.redhat.com/~dhowells/afs/dns.afsdb.c

    It should be compiled with -lresolv and -lkeyutils and installed as, say:

    /usr/sbin/dns.afsdb

    Then the following line needs to be added to /sbin/request-key.conf:

    create dns_resolver afsdb:* * /usr/sbin/dns.afsdb %k

    This can be tested by mounting AFS, say:

    insmod dns_resolver.ko
    insmod af-rxrpc.ko
    insmod kafs.ko rootcell=grand.central.org
    mount -t afs "#grand.central.org:root.cell." /afs -o autocell

    and doing:

    ls /afs/grand.central.org/

    which should show:

    archive/ cvs/ doc/ local/ project/ service/ software/ user/ www/

    if it works.

    Signed-off-by: Wang Lei
    Signed-off-by: David Howells
    Signed-off-by: Steve French

    wanglei
     
  • If the DNS server returns an error, allow that to be cached in the DNS resolver
    key in lieu of a value. Userspace passes the desired error number as an option
    in the payload:

    "#dnserror="

    Userspace must map h_errno from the name resolution routines to an appropriate
    Linux error before passing it up. Something like the following mapping is
    recommended:

    [HOST_NOT_FOUND] = ENODATA,
    [TRY_AGAIN] = EAGAIN,
    [NO_RECOVERY] = ECONNREFUSED,
    [NO_DATA] = ENODATA,

    in lieu of Linux errors specifically for representing name service errors. The
    filesystem must map these errors appropropriately before passing them to
    userspace. AFS is made to map ENODATA and EAGAIN to EDESTADDRREQ for the
    return to userspace; ECONNREFUSED is allowed to stand as is.

    The error can be seen in /proc/keys as a negative number after the description
    of the key. Compare, for example, the following key entries:

    2f97238c I--Q-- 1 53s 3f010000 0 0 dns_resol afsdb:grand.centrall.org: -61
    338bfbbe I--Q-- 1 59m 3f010000 0 0 dns_resol afsdb:grand.central.org: 37

    If the error option is supplied in the payload, the main part of the payload is
    discarded. The key should have an expiry time set by userspace.

    Signed-off-by: Wang Lei
    Signed-off-by: David Howells
    Acked-by: Jeff Layton
    Signed-off-by: Steve French

    Wang Lei
     

06 Aug, 2010

1 commit

  • Add DNS query support for AFS so that it can get the IP addresses of Volume
    Location servers from the DNS using an AFSDB record.

    This requires userspace support. /etc/request-key.conf must be configured to
    invoke a helper for dns_resolver type keys with a subtype of "afsdb:" in the
    description.

    Signed-off-by: Wang Lei
    Signed-off-by: David Howells
    Signed-off-by: Steve French

    Wang Lei
     

03 Apr, 2009

1 commit

  • The attached patch makes the kAFS filesystem in fs/afs/ use FS-Cache, and
    through it any attached caches. The kAFS filesystem will use caching
    automatically if it's available.

    Signed-off-by: David Howells
    Acked-by: Steve Dickson
    Acked-by: Trond Myklebust
    Acked-by: Al Viro
    Tested-by: Daire Byrne

    David Howells
     

29 Apr, 2008

1 commit


02 Apr, 2008

1 commit


29 Mar, 2008

1 commit

  • kafs doesn't check if the cell already exists - so if you do an echo "add
    newcell.org 1.2.3.4" >/proc/fs/afs/cells it will try to create this cell
    again. kobject will also complain about a double registration. To prevent
    such problems, return -EEXIST in that case.

    Signed-off-by: Sven Schnelle
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sven Schnelle
     

17 Oct, 2007

2 commits

  • Make request_key() and co fundamentally asynchronous to make it easier for
    NFS to make use of them. There are now accessor functions that do
    asynchronous constructions, a wait function to wait for construction to
    complete, and a completion function for the key type to indicate completion
    of construction.

    Note that the construction queue is now gone. Instead, keys under
    construction are linked in to the appropriate keyring in advance, and that
    anyone encountering one must wait for it to be complete before they can use
    it. This is done automatically for userspace.

    The following auxiliary changes are also made:

    (1) Key type implementation stuff is split from linux/key.h into
    linux/key-type.h.

    (2) AF_RXRPC provides a way to allocate null rxrpc-type keys so that AFS does
    not need to call key_instantiate_and_link() directly.

    (3) Adjust the debugging macros so that they're -Wformat checked even if
    they are disabled, and make it so they can be enabled simply by defining
    __KDEBUG to be consistent with other code of mine.

    (3) Documentation.

    [alan@lxorguk.ukuu.org.uk: keys: missing word in documentation]
    Signed-off-by: David Howells
    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • This patch contains the following possible cleanups:
    - make the following needlessly global functions static:
    - rxrpc.c: afs_send_pages()
    - vlocation.c: afs_vlocation_queue_for_updates()
    - write.c: afs_writepages_region()
    - make the following needlessly global variables static:
    - mntpt.c: afs_mntpt_expiry_timeout
    - proc.c: afs_vlocation_states[]
    - server.c: afs_server_timeout
    - vlocation.c: afs_vlocation_timeout
    - vlocation.c: afs_vlocation_update_timeout
    - #if 0 the following unused function:
    - cell.c: afs_get_cell_maybe()
    - #if 0 the following unused variables:
    - callback.c: afs_vnode_update_timeout
    - cmservice.c: struct afs_cm_workqueue

    Signed-off-by: Adrian Bunk
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

22 May, 2007

1 commit

  • First thing mm.h does is including sched.h solely for can_do_mlock() inline
    function which has "current" dereference inside. By dealing with can_do_mlock()
    mm.h can be detached from sched.h which is good. See below, why.

    This patch
    a) removes unconditional inclusion of sched.h from mm.h
    b) makes can_do_mlock() normal function in mm/mlock.c
    c) exports can_do_mlock() to not break compilation
    d) adds sched.h inclusions back to files that were getting it indirectly.
    e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
    getting them indirectly

    Net result is:
    a) mm.h users would get less code to open, read, preprocess, parse, ... if
    they don't need sched.h
    b) sched.h stops being dependency for significant number of files:
    on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
    after patch it's only 3744 (-8.3%).

    Cross-compile tested on

    all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
    alpha alpha-up
    arm
    i386 i386-up i386-defconfig i386-allnoconfig
    ia64 ia64-up
    m68k
    mips
    parisc parisc-up
    powerpc powerpc-up
    s390 s390-up
    sparc sparc-up
    sparc64 sparc64-up
    um-x86_64
    x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

    as well as my two usual configs.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

27 Apr, 2007

3 commits


15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

27 Jun, 2006

1 commit

  • This patch converts the combination of list_del(A) and list_add(A, B) to
    list_move(A, B) under fs/.

    Cc: Ian Kent
    Acked-by: Joel Becker
    Cc: Neil Brown
    Cc: Hans Reiser
    Cc: Urban Widmark
    Acked-by: David Howells
    Acked-by: Mark Fasheh
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds