17 Jan, 2006

19 commits

  • Fix race in setting bitfields of fuse_conn. Spotted by Andrew Morton.

    The two fields ->connected and ->mounted were always changed with the
    fuse_lock held. But other bitfields in the same structure were changed
    without the lock. In theory this could lead to losing the assignment of
    even the ones under lock. The chosen solution is to change these two
    fields to be a full unsigned type. The other bitfields aren't "important"
    enough to warrant the extra complexity of full locking or changing them to
    bitops.

    For all bitfields document why they are safe wrt. concurrent
    assignments.

    Also make the initialization of the 'num_waiting' atomic counter explicit.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • This patch changes fuse_readpages() to send READ requests asynchronously.

    This makes it possible for userspace filesystems to utilize the kernel
    readahead logic instead of having to implement their own (resulting in double
    caching).

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Add a separate function for filling in the READ request. This will make it
    possible to send asynchronous READ requests as well as synchronous ones.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Now the INIT requests can be completely handled in inode.c and the
    fuse_send_init() function need not be global any more.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Add possibility for requests to run asynchronously and call an 'end' callback
    when finished.

    With this, the special handling of the INIT and RELEASE requests can be
    cleaned up too.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Add ability to abort a filesystem connection.

    With the introduction of asynchronous reads, the ability to interrupt any
    request is not enough to dissolve deadlocks, since now waiting for the request
    completion (page unlocked) is independent of the actual request, so in a
    deadlock all threads will be uninterruptible.

    The solution is to make it possible to abort all requests, even those
    currently undergoing I/O to/from userspace. The natural interface for this is
    'mount -f mountpoint', but that only works as long as the filesystem is
    attached. So also add an 'abort' attribute to the sysfs view of the
    connection.

    Signed-off-by: Miklos Szeredi
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • This patch adds the 'waiting' attribute which indicates how many filesystem
    requests are currently waiting to be completed. A non-zero value without any
    filesystem activity indicates a hung or deadlocked filesystem.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Kobjectify fuse_conn, and make it visible under /sys/fs/fuse/connections.

    Lacking any natural naming, connections are numbered.

    This patch doesn't add any attributes, just the infrastructure.

    Signed-off-by: Miklos Szeredi
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • The ->connected flag for a fuse_conn object previously only indicated whether
    the device file for this connection is currently open or not.

    Change it's meaning so that it indicates whether the connection is active or
    not: now either umount or device release will clear the flag.

    The separate ->mounted flag is still needed for handling background requests.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Create a new list for requests in the process of being transfered to/from
    userspace. This will be needed to be able to abort all requests even those
    currently under I/O

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • The state of request was made up of 2 bitfields (->sent and ->finished) and of
    the fact that the request was on a list or not.

    Unify this into a single state field.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • - remove some unneeded assignments

    - use kzalloc instead of kmalloc + memset

    - simplify setting sb->s_fs_info

    - in fuse_send_init() use fuse_get_request() instead of
    do_get_request() helper

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Inline keyword is unnecessary in most cases. Clean them up.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Handle the case when the INIT request is answered with an error.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • This function used the request object after decrementing its reference count
    and releasing the lock. This could in theory lead to all sorts of problems.

    Fix and simplify at the same time.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • fuse_copy_finish() must be called before request_end(), since the later might
    sleep, and no sleeping is allowed between fuse_copy_one() and
    fuse_copy_finish() because of kmap_atomic()/kunmap_atomic() used in them.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • This patch adds an empty /sys/fs, which filesystems can use.

    Signed-off-by: Miklos Szeredi
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • The Rio Karma portable MP3 player has its own proprietary partition table.

    The partition layout is similar to a DOS boot sector but it begins at a
    different offset and uses a different magic number (0xAB56 instead of
    0xAA55). Add support for it to enable mounting the device.

    Signed-off-by: Bob Copeland
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bob Copeland
     
  • like other routines here, to ensure buffers are correctly initialised
    with respect to b_private/b_end_io. Fixes an odd interaction between
    XFS and reiserfs.

    Signed-off-by: Nathan Scott

    Nathan Scott
     

16 Jan, 2006

5 commits


15 Jan, 2006

15 commits

  • Mark a few VFS functions as mandatory inline (based on Al Viro's request);
    these must be inline due to stack usage issues during a recursive loop that
    happens during the recursive symlink resolution (symlink to a symlink to a
    symlink ..)

    This patch at this point does not change behavior and is for documentation
    purposes only (but this changes later in the series)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Remove the remaining kmalloc() wrapper bits from fs/smbfs/.

    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • Remove remaining kmalloc wrapper bits from fs/ncpfs/.

    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • fs/quota_v2.c can, under some conditions, issue a kernel message that says,
    in totality, 'failed read'. This patch does the following:

    1) Gives a hint who issued the error message, so people reading the logs
    don't have to go grepping the entire kernel tree (with 11 false
    positives).

    2) Say what amount of data we expected, and actually got.

    Signed-off-by: Valdis Kletnieks
    Cc: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Valdis.Kletnieks@vt.edu
     
  • Remove redundant NULL check in reiserfs_lookup() as d_splice_alias() can take
    NULL inode as input.

    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • Remove redundant NULL check in isofs_lookup() as d_splice_alias() can take
    NULL inode as input.

    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • Remove redundant NULL check in ext3_lookup() as d_splice_alias() can take NULL
    inode as input.

    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • Remove redundant NULL check in ext2_lookup() as d_splice_alias() can take NULL
    inode as input.

    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • Anything that writes into a tmpfs filesystem is liable to disproportionately
    decrease the available memory on a particular node. Since there's no telling
    what sort of application (e.g. dd/cp/cat) might be dropping large files
    there, this lets the admin choose the appropriate default behavior for their
    site's situation.

    Introduce a tmpfs mount option which allows specifying a memory policy and
    a second option to specify the nodelist for that policy. With the default
    policy, tmpfs will behave as it does today. This patch adds support for
    preferred, bind, and interleave policies.

    The default policy will cause pages to be added to tmpfs files on the node
    which is doing the writing. Some jobs expect a single process to create
    and manage the tmpfs files. This results in a node which has a
    significantly reduced number of free pages.

    With this patch, the administrator can specify the policy and nodes for
    that policy where they would prefer allocations.

    This patch was originally written by Brent Casavant and Hugh Dickins. I
    added support for the bind and preferred policies and the mpol_nodelist
    mount option.

    Signed-off-by: Brent Casavant
    Signed-off-by: Hugh Dickins
    Signed-off-by: Robin Holt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Holt
     
  • Remove the "inline" keyword from a bunch of big functions in the kernel with
    the goal of shrinking it by 30kb to 40kb

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Acked-by: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • A Christoph suggested that the /proc/devices file be converted to use the
    seq_file interface. This patch does that.

    I've obxerved one or two installation that had sufficiently large sans that
    they overran the 4k limit on /proc/devices.

    Signed-off-by: Neil Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     
  • We forgot to initialise a couple of nameidata fields.

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

    Ian Kent
     
  • I tried to send the forcedeth maintainer an email, but it came back with:

    "The mail address manfreds@colorfullife.com is not read anymore.
    Please resent your mail to manfred@ instead of manfreds@."

    This patch fixes this.

    Signed-off-by: Adrian Bunk

    Christian Kujau
     
  • This patch removes pointless parentheses from return statements.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Adrian Bunk

    Jesper Juhl
     
  • Here is update of ufs cleanup patch, brought on by the recently fixed
    ubh_get_usb_second() bug that made some ugly code rather painfully
    obvious. It also includes

    - fix compilation warnings which appears if debug mode turn on
    - remove unnecessary duplication of code to support UFS2

    I tested it on ufs1 and ufs2 file-systems.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Linus Torvalds

    Evgeniy
     

14 Jan, 2006

1 commit