22 Jan, 2009

1 commit


10 Jan, 2009

1 commit

  • Currently, ext3 in mainline Linux doesn't have the freeze feature which
    suspends write requests. So, we cannot take a backup which keeps the
    filesystem's consistency with the storage device's features (snapshot and
    replication) while it is mounted.

    In many case, a commercial filesystem (e.g. VxFS) has the freeze feature
    and it would be used to get the consistent backup.

    If Linux's standard filesystem ext3 has the freeze feature, we can do it
    without a commercial filesystem.

    So I have implemented the ioctls of the freeze feature.
    I think we can take the consistent backup with the following steps.
    1. Freeze the filesystem with the freeze ioctl.
    2. Separate the replication volume or create the snapshot
    with the storage device's feature.
    3. Unfreeze the filesystem with the unfreeze ioctl.
    4. Take the backup from the separated replication volume
    or the snapshot.

    This patch:

    VFS:
    Changed the type of write_super_lockfs and unlockfs from "void"
    to "int" so that they can return an error.
    Rename write_super_lockfs and unlockfs of the super block operation
    freeze_fs and unfreeze_fs to avoid a confusion.

    ext3, ext4, xfs, gfs2, jfs:
    Changed the type of write_super_lockfs and unlockfs from "void"
    to "int" so that write_super_lockfs returns an error if needed,
    and unlockfs always returns 0.

    reiserfs:
    Changed the type of write_super_lockfs and unlockfs from "void"
    to "int" so that they always return 0 (success) to keep a current behavior.

    Signed-off-by: Takashi Sato
    Signed-off-by: Masayuki Hamaguchi
    Cc:
    Cc:
    Cc: Christoph Hellwig
    Cc: Dave Kleikamp
    Cc: Dave Chinner
    Cc: Alasdair G Kergon
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Takashi Sato
     

06 Jan, 2009

5 commits

  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (138 commits)
    ocfs2: Access the right buffer_head in ocfs2_merge_rec_left.
    ocfs2: use min_t in ocfs2_quota_read()
    ocfs2: remove unneeded lvb casts
    ocfs2: Add xattr support checking in init_security
    ocfs2: alloc xattr bucket in ocfs2_xattr_set_handle
    ocfs2: calculate and reserve credits for xattr value in mknod
    ocfs2/xattr: fix credits calculation during index create
    ocfs2/xattr: Always updating ctime during xattr set.
    ocfs2/xattr: Remove extend_trans call and add its credits from the beginning
    ocfs2/dlm: Fix race during lockres mastery
    ocfs2/dlm: Fix race in adding/removing lockres' to/from the tracking list
    ocfs2/dlm: Hold off sending lockres drop ref message while lockres is migrating
    ocfs2/dlm: Clean up errors in dlm_proxy_ast_handler()
    ocfs2/dlm: Fix a race between migrate request and exit domain
    ocfs2: One more hamming code optimization.
    ocfs2: Another hamming code optimization.
    ocfs2: Don't hand-code xor in ocfs2_hamming_encode().
    ocfs2: Enable metadata checksums.
    ocfs2: Validate superblock with checksum and ecc.
    ocfs2: Checksum and ECC for directory blocks.
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    inotify: fix type errors in interfaces
    fix breakage in reiserfs_new_inode()
    fix the treatment of jfs special inodes
    vfs: remove duplicate code in get_fs_type()
    add a vfs_fsync helper
    sys_execve and sys_uselib do not call into fsnotify
    zero i_uid/i_gid on inode allocation
    inode->i_op is never NULL
    ntfs: don't NULL i_op
    isofs check for NULL ->i_op in root directory is dead code
    affs: do not zero ->i_op
    kill suid bit only for regular files
    vfs: lseek(fd, 0, SEEK_CUR) race condition

    Linus Torvalds
     
  • now that we use ih.key earlier, we need to do all its setup early enough

    Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Jan Kara
    Signed-off-by: Mark Fasheh

    Jan Kara
     
  • Signed-off-by: Jan Kara
    Signed-off-by: Mark Fasheh

    Jan Kara
     

05 Jan, 2009

1 commit

  • With the write_begin/write_end aops, page_symlink was broken because it
    could no longer pass a GFP_NOFS type mask into the point where the
    allocations happened. They are done in write_begin, which would always
    assume that the filesystem can be entered from reclaim. This bug could
    cause filesystem deadlocks.

    The funny thing with having a gfp_t mask there is that it doesn't really
    allow the caller to arbitrarily tinker with the context in which it can be
    called. It couldn't ever be GFP_ATOMIC, for example, because it needs to
    take the page lock. The only thing any callers care about is __GFP_FS
    anyway, so turn that into a single flag.

    Add a new flag for write_begin, AOP_FLAG_NOFS. Filesystems can now act on
    this flag in their write_begin function. Change __grab_cache_page to
    accept a nofs argument as well, to honour that flag (while we're there,
    change the name to grab_cache_page_write_begin which is more instructive
    and does away with random leading underscores).

    This is really a more flexible way to go in the end anyway -- if a
    filesystem happens to want any extra allocations aside from the pagecache
    ones in ints write_begin function, it may now use GFP_KERNEL (rather than
    GFP_NOFS) for common case allocations (eg. ocfs2_alloc_write_ctxt, for a
    random example).

    [kosaki.motohiro@jp.fujitsu.com: fix ubifs]
    [kosaki.motohiro@jp.fujitsu.com: fix fuse]
    Signed-off-by: Nick Piggin
    Reviewed-by: KOSAKI Motohiro
    Cc: [2.6.28.x]
    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    [ Cleaned up the calling convention: just pass in the AOP flags
    untouched to the grab_cache_page_write_begin() function. That
    just simplifies everybody, and may even allow future expansion of the
    logic. - Linus ]
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

01 Jan, 2009

1 commit


14 Nov, 2008

1 commit

  • Wrap access to task credentials so that they can be separated more easily from
    the task_struct during the introduction of COW creds.

    Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

    Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
    sense to use RCU directly rather than a convenient wrapper; these will be
    addressed by later patches.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Acked-by: Serge Hallyn
    Cc: reiserfs-devel@vger.kernel.org
    Signed-off-by: James Morris

    David Howells
     

24 Oct, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits)
    [PATCH] kill the rest of struct file propagation in block ioctls
    [PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET
    [PATCH] get rid of blkdev_locked_ioctl()
    [PATCH] get rid of blkdev_driver_ioctl()
    [PATCH] sanitize blkdev_get() and friends
    [PATCH] remember mode of reiserfs journal
    [PATCH] propagate mode through swsusp_close()
    [PATCH] propagate mode through open_bdev_excl/close_bdev_excl
    [PATCH] pass fmode_t to blkdev_put()
    [PATCH] kill the unused bsize on the send side of /dev/loop
    [PATCH] trim file propagation in block/compat_ioctl.c
    [PATCH] end of methods switch: remove the old ones
    [PATCH] switch sr
    [PATCH] switch sd
    [PATCH] switch ide-scsi
    [PATCH] switch tape_block
    [PATCH] switch dcssblk
    [PATCH] switch dasd
    [PATCH] switch mtd_blkdevs
    [PATCH] switch mmc
    ...

    Linus Torvalds
     

23 Oct, 2008

3 commits


21 Oct, 2008

4 commits


17 Oct, 2008

2 commits

  • In case of error, the function open_xa_dir returns an ERR pointer, but
    never returns a NULL pointer. So a NULL test that comes after an IS_ERR
    test should be deleted.

    The semantic match that finds this problem is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @match_bad_null_test@
    expression x, E;
    statement S1,S2;
    @@
    x = open_xa_dir(...)
    ... when != x = E
    (
    * if (x == NULL && ...) S1 else S2
    |
    * if (x == NULL || ...) S1 else S2
    )
    //

    Signed-off-by: Julien Brunel
    Signed-off-by: Julia Lawall
    Cc: Jeff Mahoney
    Cc: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julien Brunel
     
  • Remove CVS keywords that weren't updated for a long time from comments.

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

    Adrian Bunk
     

13 Aug, 2008

1 commit


05 Aug, 2008

2 commits

  • Like the page lock change, this also requires name change, so convert the
    raw test_and_set bitop to a trylock.

    Signed-off-by: Nick Piggin
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Converting page lock to new locking bitops requires a change of page flag
    operation naming, so we might as well convert it to something nicer
    (!TestSetPageLocked_Lock => trylock_page, SetPageLocked => set_page_locked).

    This also facilitates lockdeping of page lock.

    Signed-off-by: Nick Piggin
    Acked-by: KOSAKI Motohiro
    Acked-by: Peter Zijlstra
    Acked-by: Andrew Morton
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

01 Aug, 2008

1 commit

  • * new helper: vfs_quota_on_path(); equivalent of vfs_quota_on() sans the
    pathname resolution.
    * callers of vfs_quota_on() that do their own pathname resolution and
    checks based on it are switched to vfs_quota_on_path(); that way we
    avoid the races.
    * reiserfs leaked dentry/vfsmount references on several failure exits.

    Signed-off-by: Al Viro

    Al Viro
     

27 Jul, 2008

2 commits

  • * kill nameidata * argument; map the 3 bits in ->flags anybody cares
    about to new MAY_... ones and pass with the mask.
    * kill redundant gfs2_iop_permission()
    * sanitize ecryptfs_permission()
    * fix remaining places where ->permission() instances might barf on new
    MAY_... found in mask.

    The obvious next target in that direction is permission(9)

    folded fix for nfs_permission() breakage from Miklos Szeredi

    Signed-off-by: Al Viro

    Al Viro
     
  • Kmem cache passed to constructor is only needed for constructors that are
    themselves multiplexeres. Nobody uses this "feature", nor does anybody uses
    passed kmem cache in non-trivial way, so pass only pointer to object.

    Non-trivial places are:
    arch/powerpc/mm/init_64.c
    arch/powerpc/mm/hugetlbpage.c

    This is flag day, yes.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Pekka Enberg
    Acked-by: Christoph Lameter
    Cc: Jon Tollefson
    Cc: Nick Piggin
    Cc: Matt Mackall
    [akpm@linux-foundation.org: fix arch/powerpc/mm/hugetlbpage.c]
    [akpm@linux-foundation.org: fix mm/slab.c]
    [akpm@linux-foundation.org: fix ubifs]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

26 Jul, 2008

8 commits

  • Move declarations of some macros, which should be in fact functions to
    quotaops.h. This way they can be later converted to inline functions
    because we can now use declarations from quota.h. Also add necessary
    includes of quotaops.h to a few files.

    [akpm@linux-foundation.org: fix JFS build]
    [akpm@linux-foundation.org: fix UFS build]
    [vegard.nossum@gmail.com: fix QUOTA=n build]
    Signed-off-by: Jan Kara
    Cc: Vegard Nossum
    Cc: Arjen Pool
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • remove the definitions of macros:
    XATTR_SECURITY_PREFIX
    XATTR_TRUSTED_PREFIX
    XATTR_USER_PREFIX
    since they are defined in linux/xattr.h

    Signed-off-by: Shen Feng
    Signed-off-by: Mingming Cao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shen Feng
     
  • j_commit_lock is a semaphore but uses it as if it were a mutex. This patch
    converts it to a mutex.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Jeff Mahoney
    Cc: Matthew Wilcox
    Cc: Chris Mason
    Cc: Edward Shishkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • j_flush_sem is a semaphore but uses it as if it were a mutex. This patch
    converts it to a mutex.

    [akpm@linux-foundation.org: fix mutex_trylock retval treatment]
    Signed-off-by: Jeff Mahoney
    Cc: Matthew Wilcox
    Cc: Chris Mason
    Cc: Edward Shishkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • j_lock is a semaphore but uses it as if it were a mutex. This patch converts
    it to a mutex.

    Signed-off-by: Jeff Mahoney
    Cc: Matthew Wilcox
    Cc: Chris Mason
    Cc: Edward Shishkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • We should not allow user to change quota mount options when quota is just
    suspended. It would make mount options and internal quota state inconsistent.

    Also we should not allow user to change quota format when quota is turned on.
    On the other hand we can just silently ignore when some option is set to the
    value it already has (some mount versions do this on remount). Finally, we
    should not discard current quota options if parsing of mount options fails.

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

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

    Jan Kara
     
  • In journal=data mode, it is not enough to do write_inode_now() as done in
    vfs_quota_on() to write all data to their final location (which is needed for
    quota_read to work correctly). Calling journal_end_sync() before calling
    vfs_quota_on() does it's job because transactions are committed to the journal
    and data marked as dirty in memory so write_inode_now() writes them to their
    final locations.

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

    Jan Kara
     

09 Jul, 2008

1 commit

  • With the removal of struct file from the xattr code,
    reiserfs_file_release() isn't used anymore, so the prealloc isn't
    discarded. This causes hangs later down the line.

    This patch adds it to reiserfs_delete_inode. In most cases it will be a
    no-op due to it already having been called, but will avoid hangs with
    xattrs.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     

05 Jul, 2008

1 commit


30 Apr, 2008

1 commit

  • Use the proper helper to open a blockdevice by name for filesystem use,
    this makes sure it's properly claimed (also added for open-by-number) and
    gets rid of the struct file abuse.

    Tested by mounting a reiserfs filesystem with external journal.

    Signed-off-by: Christoph Hellwig
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Acked-by: Edward Shishkin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

29 Apr, 2008

1 commit

  • Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data
    be setup before gluing PDE to main tree.

    /proc entry owner is also added.

    Signed-off-by: Denis V. Lunev
    Cc: Jeff Mahoney
    Cc: Chris Mason
    Cc: Alexey Dobriyan
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis V. Lunev
     

28 Apr, 2008

2 commits

  • Quota files cannot have tails because quota_write and quota_read functions do
    not support them. So far when quota files did have tail, we just refused to
    turn quotas on it. Sadly this check has been wrong and so there are now
    plenty installations where quota files don't have NOTAIL flag set and so now
    after fixing the check, they suddently fail to turn quotas on. Since it's
    easy to unpack the tail from kernel, do this from reiserfs_quota_on() which
    solves the problem and is generally nicer to users anyway.

    Signed-off-by: Jan Kara
    Reported-by:
    Cc: Jeff Mahoney
    Cc: Chris Mason
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Call dquot_drop() from reiserfs_dquot_drop() even if we fail to start a
    transaction. Otherwise we never get to dropping references to quota
    structures from the inode and umount will hang indefinitely.

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

    Jan Kara