29 Jan, 2008

1 commit

  • The i_version field of the inode is changed to be a 64-bit counter that
    is set on every inode creation and that is incremented every time the
    inode data is modified (similarly to the "ctime" time-stamp).
    The aim is to fulfill a NFSv4 requirement for rfc3530.
    This first part concerns the vfs, it converts the 32-bit i_version in
    the generic inode to a 64-bit, a flag is added in the super block in
    order to check if the feature is enabled and the i_version is
    incremented in the vfs.

    Signed-off-by: Mingming Cao
    Signed-off-by: Jean Noel Cordenner
    Signed-off-by: Kalpak Shah

    Jean Noel Cordenner
     

06 Nov, 2007

1 commit


17 Oct, 2007

4 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
     
  • mm.h doesn't use directly anything from mutex.h and backing-dev.h, so
    remove them and add them back to files which need them.

    Cross-compile tested on many configs and archs.

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

    Alexey Dobriyan
     
  • 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
     
  • Slab constructors currently have a flags parameter that is never used. And
    the order of the arguments is opposite to other slab functions. The object
    pointer is placed before the kmem_cache pointer.

    Convert

    ctor(void *object, struct kmem_cache *s, unsigned long flags)

    to

    ctor(struct kmem_cache *s, void *object)

    throughout the kernel

    [akpm@linux-foundation.org: coupla fixes]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

16 Oct, 2007

1 commit

  • * 'locks' of git://linux-nfs.org/~bfields/linux:
    nfsd: remove IS_ISMNDLCK macro
    Rework /proc/locks via seq_files and seq_list helpers
    fs/locks.c: use list_for_each_entry() instead of list_for_each()
    NFS: clean up explicit check for mandatory locks
    AFS: clean up explicit check for mandatory locks
    9PFS: clean up explicit check for mandatory locks
    GFS2: clean up explicit check for mandatory locks
    Cleanup macros for distinguishing mandatory locks
    Documentation: move locks.txt in filesystems/
    locks: add warning about mandatory locking races
    Documentation: move mandatory locking documentation to filesystems/
    locks: Fix potential OOPS in generic_setlease()
    Use list_first_entry in locks_wake_up_blocks
    locks: fix flock_lock_file() comment
    Memory shortage can result in inconsistent flocks state
    locks: kill redundant local variable
    locks: reverse order of posix_locks_conflict() arguments

    Linus Torvalds
     

11 Oct, 2007

1 commit

  • This patch makes most of the generic device layer network
    namespace safe. This patch makes dev_base_head a
    network namespace variable, and then it picks up
    a few associated variables. The functions:
    dev_getbyhwaddr
    dev_getfirsthwbytype
    dev_get_by_flags
    dev_get_by_name
    __dev_get_by_name
    dev_get_by_index
    __dev_get_by_index
    dev_ioctl
    dev_ethtool
    dev_load
    wireless_process_ioctl

    were modified to take a network namespace argument, and
    deal with it.

    vlan_ioctl_set and brioctl_set were modified so their
    hooks will receive a network namespace argument.

    So basically anthing in the core of the network stack that was
    affected to by the change of dev_base was modified to handle
    multiple network namespaces. The rest of the network stack was
    simply modified to explicitly use &init_net the initial network
    namespace. This can be fixed when those components of the network
    stack are modified to handle multiple network namespaces.

    For now the ifindex generator is left global.

    Fundametally ifindex numbers are per namespace, or else
    we will have corner case problems with migration when
    we get that far.

    At the same time there are assumptions in the network stack
    that the ifindex of a network device won't change. Making
    the ifindex number global seems a good compromise until
    the network stack can cope with ifindex changes when
    you change namespaces, and the like.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

10 Oct, 2007

1 commit


12 Sep, 2007

1 commit


01 Aug, 2007

1 commit

  • Fix file locking for AFS:

    (*) Start the lock manager thread under a mutex to avoid a race.

    (*) Made the locking non-fair: New readlocks will jump pending writelocks if
    there's a readlock currently granted on a file. This makes the behaviour
    similar to Linux's VFS locking.

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

    David Howells
     

20 Jul, 2007

3 commits

  • Fix afs_send_simple_reply() to accept a greater-than-zero return value from
    rxrpc_kernel_send_data() as being a successful return rather than thinking it
    an error and aborting the call.

    rxrpc_kernel_send_data() previously returned zero incorrectly when it worked
    successfully, but has been patched to return the number of bytes it
    transmitted.

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Slab destructors were no longer supported after Christoph's
    c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
    BUGs for both slab and slub, and slob never supported them
    either.

    This rips out support for the dtor pointer from kmem_cache_create()
    completely and fixes up every single callsite in the kernel (there were
    about 224, not including the slab allocator definitions themselves,
    or the documentation references).

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Bruce and David's patches clashed.

    fs/afs/flock.c: In function 'afs_do_getlk':
    fs/afs/flock.c:459: error: void value not ignored as it ought to be

    Cc: "J. Bruce Fields"
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

17 Jul, 2007

3 commits


10 Jul, 2007

1 commit


31 May, 2007

1 commit

  • mips:

    fs/afs/flock.c: In function `afs_lock_may_be_available':
    fs/afs/flock.c:55: error: dereferencing pointer to incomplete type
    fs/afs/flock.c: In function `afs_lock_work':
    fs/afs/flock.c:84: error: dereferencing pointer to incomplete type
    fs/afs/flock.c:89: error: dereferencing pointer to incomplete type
    fs/afs/flock.c:109: error: dereferencing pointer to incomplete type
    fs/afs/flock.c:135: error: dereferencing pointer to incomplete type
    fs/afs/flock.c:143: error: dereferencing pointer to incomplete type
    fs/afs/flock.c:158: error: dereferencing pointer to incomplete type
    fs/afs/flock.c:161: error: dereferencing pointer to incomplete type
    fs/afs/flock.c:179: error: `TASK_UNINTERRUPTIBLE' undeclared (first use in this function)
    fs/afs/flock.c:179: error: (Each undeclared identifier is reported only once
    fs/afs/flock.c:179: error: for each function it appears in.)
    fs/afs/flock.c:179: error: `TASK_INTERRUPTIBLE' undeclared (first use in this function)
    fs/afs/flock.c:182: error: dereferencing pointer to incomplete type

    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

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
     

17 May, 2007

3 commits

  • SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.

    Signed-off-by: Christoph Lameter
    Cc: David Howells
    Cc: Jens Axboe
    Cc: Steven French
    Cc: Michael Halcrow
    Cc: OGAWA Hirofumi
    Cc: Miklos Szeredi
    Cc: Steven Whitehouse
    Cc: Roman Zippel
    Cc: David Woodhouse
    Cc: Dave Kleikamp
    Cc: Trond Myklebust
    Cc: "J. Bruce Fields"
    Cc: Anton Altaparmakov
    Cc: Mark Fasheh
    Cc: Paul Mackerras
    Cc: Christoph Hellwig
    Cc: Jan Kara
    Cc: David Chinner
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • afs_prepare_write() should not mark a page up to date if it only partially
    fills it in, in expectation of the caller filling in the rest prior to calling
    commit_write(). commit_write(), however, should mark the page up to date.

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

    David Howells
     
  • Fix AFS to write back dirty on unmounting. This didn't happen because
    afs_super_ops.drop_inode was pointing to generic_delete_inode. Now this
    pointer is left set to NULL so that the default behaviour occurs instead.

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

    David Howells
     

11 May, 2007

5 commits

  • Implement the statfs() op for AFS.

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

    David Howells
     
  • Fix a couple of problems with unlinking AFS files.

    (1) The parent directory wasn't being updated properly between unlink() and
    the following lookup().

    It seems that, for some reason, invalidate_remote_inode() wasn't
    discarding the directory contents correctly, so this patch calls
    invalidate_inode_pages2() instead on non-regular files.

    (2) afs_vnode_deleted_remotely() should handle vnodes that don't have a
    source server recorded without oopsing.

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

    David Howells
     
  • Following bug was uncovered by compiling with '-W' flag:

    CC [M] fs/afs/write.o
    fs/afs/write.c: In function ‘afs_write_back_from_locked_page’:
    fs/afs/write.c:398: warning: comparison of unsigned expression >= 0 is always true

    Loop variable 'n' is unsigned, so wraps around happily as far as I can
    see. Trival fix attached (compile tested only).

    Signed-off-by: Mika Kukkonen
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Further fixes for AFS write support:

    (1) The afs_send_pages() outer loop must do an extra iteration if it ends
    with 'first == last' because 'last' is inclusive in the page set
    otherwise it fails to send the last page and complete the RxRPC op under
    some circumstances.

    (2) Similarly, the outer loop in afs_pages_written_back() must also do an
    extra iteration if it ends with 'first == last', otherwise it fails to
    clear PG_writeback on the last page under some circumstances.

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

    David Howells
     
  • AFS write support fixes:

    (1) Support large files using the 64-bit file access operations if available
    on the server.

    (2) Use kmap_atomic() rather than kmap() in afs_prepare_page().

    (3) Don't do stuff in afs_writepage() that's done by the caller.

    [akpm@linux-foundation.org: fix right shift count >= width of type]
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

10 May, 2007

2 commits

  • Implement support for writing to regular AFS files, including:

    (1) write

    (2) truncate

    (3) fsync, fdatasync

    (4) chmod, chown, chgrp, utime.

    AFS writeback attempts to batch writes into as chunks as large as it can manage
    up to the point that it writes back 65535 pages in one chunk or it meets a
    locked page.

    Furthermore, if a page has been written to using a particular key, then should
    another write to that page use some other key, the first write will be flushed
    before the second is allowed to take place. If the first write fails due to a
    security error, then the page will be scrapped and reread before the second
    write takes place.

    If a page is dirty and the callback on it is broken by the server, then the
    dirty data is not discarded (same behaviour as NFS).

    Shared-writable mappings are not supported by this patch.

    [akpm@linux-foundation.org: fix a bunch of warnings]
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Make some miscellaneous changes to the AFS filesystem:

    (1) Assert RCU barriers on module exit to make sure RCU has finished with
    callbacks in this module.

    (2) Correctly handle the AFS server returning a zero-length read.

    (3) Split out data zapping calls into one function (afs_zap_data).

    (4) Rename some afs_file_*() functions to afs_*() where they apply to
    non-regular files too.

    (5) Be consistent about the presentation of volume ID:vnode ID in debugging
    output.

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

    David Howells
     

08 May, 2007

2 commits

  • I have never seen a use of SLAB_DEBUG_INITIAL. It is only supported by
    SLAB.

    I think its purpose was to have a callback after an object has been freed
    to verify that the state is the constructor state again? The callback is
    performed before each freeing of an object.

    I would think that it is much easier to check the object state manually
    before the free. That also places the check near the code object
    manipulation of the object.

    Also the SLAB_DEBUG_INITIAL callback is only performed if the kernel was
    compiled with SLAB debugging on. If there would be code in a constructor
    handling SLAB_DEBUG_INITIAL then it would have to be conditional on
    SLAB_DEBUG otherwise it would just be dead code. But there is no such code
    in the kernel. I think SLUB_DEBUG_INITIAL is too problematic to make real
    use of, difficult to understand and there are easier ways to accomplish the
    same effect (i.e. add debug code before kfree).

    There is a related flag SLAB_CTOR_VERIFY that is frequently checked to be
    clear in fs inode caches. Remove the pointless checks (they would even be
    pointless without removeal of SLAB_DEBUG_INITIAL) from the fs constructors.

    This is the last slab flag that SLUB did not support. Remove the check for
    unimplemented flags from SLUB.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Ensure pages are uptodate after returning from read_cache_page, which allows
    us to cut out most of the filesystem-internal PageUptodate calls.

    I didn't have a great look down the call chains, but this appears to fixes 7
    possible use-before uptodate in hfs, 2 in hfsplus, 1 in jfs, a few in
    ecryptfs, 1 in jffs2, and a possible cleared data overwritten with readpage in
    block2mtd. All depending on whether the filler is async and/or can return
    with a !uptodate page.

    Signed-off-by: Nick Piggin
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

04 May, 2007

1 commit

  • Cleanup of dev_base list use, with the aim to simplify making device
    list per-namespace. In almost every occasion, use of dev_base variable
    and dev->next pointer could be easily replaced by for_each_netdev
    loop. A few most complicated places were converted to using
    first_netdev()/next_netdev().

    Signed-off-by: Pavel Emelianov
    Acked-by: Kirill Korotaev
    Signed-off-by: David S. Miller

    Pavel Emelianov
     

03 May, 2007

5 commits

  • Adjust the new netdevice scanning code provided by Patrick McHardy:

    (1) Restore the function banner comments that were dropped.

    (2) Rather than using an array size of 6 in some places and an array size of
    ETH_ALEN in others, pass a pointer instead and pass the array size
    through so that we can actually check it.

    (3) Do the buffer fill count check before checking the for_primary_ifa
    condition again. This permits us to skip that check should maxbufs be
    reached before we run out of interfaces.

    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    David Howells
     
  • Replace the large and complicated rtnetlink client by two simple
    functions for getting the MAC address for the first ethernet device
    and building a list of IPv4 addresses.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • The interface array is not freed on exit.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Fix use of __exit functions from __init path.

    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    David Howells
     
  • Make miscellaneous fixes to AFS and AF_RXRPC:

    (*) Make AF_RXRPC select KEYS rather than RXKAD or AFS_FS in Kconfig.

    (*) Don't use FS_BINARY_MOUNTDATA.

    (*) Remove a done 'TODO' item in a comemnt on afs_get_sb().

    (*) Don't pass a void * as the page pointer argument of kmap_atomic() as this
    breaks on m68k. Patch from Geert Uytterhoeven .

    (*) Use match_*() functions rather than doing my own parsing.

    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    David Howells
     

28 Apr, 2007

2 commits

  • Fixes for various arch compilation problems:

    (*) Missing module exports.

    (*) Variable name collision when rxkad and af_rxrpc both built in
    (rxrpc_debug).

    (*) Large constant representation problem (AFS_UUID_TO_UNIX_TIME).

    (*) Configuration dependencies.

    (*) printk() format warnings.

    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    David Howells
     
  • Fix the wakeup transitions after a VLocation record update completes
    one way or another. This builds on Dave Miller's partial fix.

    Also move wakeups outside the spinlocked sections.

    Signed-off-by: David Howells
    Signed-off-by: David S. Miller

    David Howells