17 Dec, 2009

1 commit

  • Add a flags argument to struct xattr_handler and pass it to all xattr
    handler methods. This allows using the same methods for multiple
    handlers, e.g. for the ACL methods which perform exactly the same action
    for the access and default ACLs, just using a different underlying
    attribute. With a little more groundwork it'll also allow sharing the
    methods for the regular user/trusted/secure handlers in extN, ocfs2 and
    jffs2 like it's already done for xfs in this patch.

    Also change the inode argument to the handlers to a dentry to allow
    using the handlers mechnism for filesystems that require it later,
    e.g. cifs.

    [with GFS2 bits updated by Steven Whitehouse ]

    Signed-off-by: Christoph Hellwig
    Reviewed-by: James Morris
    Acked-by: Joel Becker
    Signed-off-by: Al Viro

    Christoph Hellwig
     

16 Dec, 2009

2 commits


03 Dec, 2009

28 commits

  • This patch fixes some ref counting issues. Firstly by moving
    the point at which we drop the ref count after a dlm lock
    operation has completed we ensure that we never call
    gfs2_glock_hold() on a lock with a zero ref count.

    Secondly, by using atomic_dec_and_lock() in gfs2_glock_put()
    we ensure that at no time will a glock with zero ref count
    appear on the lru_list. That means that we can remove the
    check for this in our shrinker (which was racy).

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • No one is calling wb_writeback and write_cache_pages with
    wbc.nonblocking=1 any more. And lumpy pageout will want to do
    nonblocking writeback without the congestion wait.

    Signed-off-by: Wu Fengguang
    Signed-off-by: Steven Whitehouse

    Wu Fengguang
     
  • When a gfs2 filesystem is grown, it needs to rebuild the rindex list to be able
    to use the new space. gfs2 does this when the rindex is marked not uptodate,
    which happens when the rindex glock is dropped. However, on a single node
    setup, there is never any reason to drop the rindex glock, so gfs2 never
    invalidates the the rindex. This patch makes gfs2 automatically drop the
    rindex glock after filesystem grows, so it can refresh the rindex list.

    Signed-off-by: Benjamin Marzinski
    Signed-off-by: Steven Whitehouse

    Benjamin Marzinski
     
  • There are two spare field in the header common to all GFS2
    metadata. One is just the right size to fit a journal id
    in it, and this patch updates the journal code so that each
    time a metadata block is modified, we tag it with the journal
    id of the node which is performing the modification.

    The reason for this is that it should make it much easier to
    debug issues which arise if we can tell which node was the
    last to modify a particular metadata block.

    Since the field is updated before the block is written into
    the journal, each journal should only contain metadata which
    is tagged with its own journal id. The one exception to this
    is the journal header block, which might have a different node's
    id in it, if that journal was recovered by another node in the
    cluster.

    Thus each journal will contain a record of which nodes recovered
    it, via the journal header.

    The other field in the metadata header could potentially be
    used to hold information about what kind of operation was
    performed, but for the time being we just zero it on each
    transaction so that if we use it for that in future, we'll
    know that the information (where it exists) is reliable.

    I did consider using the other field to hold the journal
    sequence number, however since in GFS2's journaling we write
    the modified data into the journal and not the original
    data, this gives no information as to what action caused the
    modification, so I think we can probably come up with a better
    use for those 64 bits in the future.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • In some cases we already have the rindex lock when
    we enter this function.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • This function only had one caller left, and that caller only
    called it for leaf blocks, hence one branch of the "if" was
    never taken. In addition the call to get_left had already
    verified the metadata type, so the function can be reduced
    to a single line of code in its caller.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • Since the default is barriers on, this only displays the
    nobarrier option when that is active.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • Currently gfs2 issues barrier unconditionally. There are various reasons
    to disable them, be that just for testing or for stupid devices flushing
    large battert backed caches. Add a nobarrier option that matches xfs and
    btrfs for this. Also add a symmetric barrier option to turn it back on
    at remount time.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Steven Whitehouse

    Christoph Hellwig
     
  • It's not necessary to do any 64bit division for the statfs sync code, so
    remove it.

    Signed-off-by: Benjamin Marzinski
    Signed-off-by: Steven Whitehouse

    Benjamin Marzinski
     
  • GFS2 now has three new mount options, statfs_quantum, quota_quantum and
    statfs_percent. statfs_quantum and quota_quantum simply allow you to
    set the tunables of the same name. Setting setting statfs_quantum to 0
    will also turn on the statfs_slow tunable. statfs_percent accepts an
    integer between 0 and 100. Numbers between 1 and 100 will cause GFS2 to
    do any early sync when the local number of blocks free changes by at
    least statfs_percent from the totoal number of blocks free. Setting
    statfs_percent to 0 disables this.

    Signed-off-by: Benjamin Marzinski
    Signed-off-by: Steven Whitehouse

    Benjamin Marzinski
     
  • This adds support to GFS2 to send quota warnings via netlink.
    Also it removes a stray \r which was left over from when the
    code used to print warnings on the console.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • This patch adds the ability to set GFS2 quota limit and
    warning levels via the XFS quota API.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • This adds support for viewing the current GFS2 quota settings
    via the XFS quota API. The setting of quotas will be addressed
    in a later patch. Fields which are not supported here are left
    set to zero.

    Signed-off-by: Steven Whitehouse
    Reviewed-by: Bob Peterson

    Steven Whitehouse
     
  • Both of these functions contained confusing and in one case
    duplicate code. This patch adds a new check in do_glock()
    so that we report -ENOENT if we are asked to sync a quota
    entry which doesn't exist. Due to the previous patch this is
    now reported correctly to userspace.

    Also there are a few new comments, and I hope that the code
    is easier to understand now.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • This function was only ever called with the "create"
    argument set to true, so we can remove it.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • The "create" argument to qdsb_get() was only ever set to true,
    so this patch removes that argument.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • For some reason, the errors were not making it to userspace.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • This allows querying of the quota state via the XFS quota
    API.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • There is no point in testing for GLF_DEMOTE here, we might as
    well always release the glock at that point.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • The plan is to add further operations to the gfs2_quotactl_ops
    in future patches. The sync operation is easy, so we start with
    that one.

    We plan to use the XFS quota control functions because they more
    closely match the GFS2 ones.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • These two functions are altered so that gfs2_quota_sync may
    in future be called directly from the VFS. The GFS2 superblock
    changes to a VFS super block and there is an addition of an int
    argument which is currently ignored.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • The other patches in this series have been building towards
    being able to support cached ACLs like other filesystems. The
    only real difference with GFS2 is that we have to invalidate
    the cache when we drop a glock, but that is dealt with in earlier
    patches.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • To prepare for support for caching of ACLs, this cleans up the GFS2
    ACL support by pushing the xattr code back into xattr.c and changing
    the acl_get function into one which only returns ACLs so that we
    can drop the caching function into it shortly.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • These two functions do the same thing, so lets only use
    one of them.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • Invalidate all the cached ACLs when we drop the glock.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     
  • This code has been shamelessly stolen from XFS at the suggestion
    of Christoph Hellwig. I've not added support for cached ACLs so
    far... watch for that in a later patch, although this is designed
    in such a way that they should be easy to add.

    Signed-off-by: Steven Whitehouse
    Cc: Christoph Hellwig

    Steven Whitehouse
     
  • We have a long term plan to use the "-o meta" flag to GFS2 mounts to
    access the alternate root which is used to store metadata for a GFS2
    filesystem. This will allow us to eventually remove support for the
    gfs2meta filesystem type (which is in any case just a "front end" to
    the gfs2 filesystem type with the meta/master root).

    Currently the "-o meta" option is only taken into account on the
    initial mount of the filesystem. Subsequent mounts of the same
    filesystem (i.e. on the same device) result in basically the same
    as bind mounting the root of the original mount.

    This patch changes that by using what is more or less a copy
    of get_sb_bdev() and extending it so that it will take into
    account the alternate root in all cases. The main difference
    is that we have to parse the mount options a bit earlier. We can
    then use them to select the appropriate root towards the end of
    the function.

    In addition this also fixes a bug where it was possible (but certainly
    not desirable) to set different ro/rw options for the meta root
    when mounted via the gfs2meta fs compared with the original mount.

    Signed-off-by: Steven Whitehouse
    Cc: Alexander Viro

    Steven Whitehouse
     
  • We need to be careful of the ordering between clearing the
    GLF_LOCK bit and scheduling the workqueue.

    Signed-off-by: Steven Whitehouse

    Steven Whitehouse
     

21 Nov, 2009

1 commit


20 Nov, 2009

1 commit


28 Sep, 2009

1 commit


24 Sep, 2009

2 commits

  • * 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6: (21 commits)
    HWPOISON: Enable error_remove_page on btrfs
    HWPOISON: Add simple debugfs interface to inject hwpoison on arbitary PFNs
    HWPOISON: Add madvise() based injector for hardware poisoned pages v4
    HWPOISON: Enable error_remove_page for NFS
    HWPOISON: Enable .remove_error_page for migration aware file systems
    HWPOISON: The high level memory error handler in the VM v7
    HWPOISON: Add PR_MCE_KILL prctl to control early kill behaviour per process
    HWPOISON: shmem: call set_page_dirty() with locked page
    HWPOISON: Define a new error_remove_page address space op for async truncation
    HWPOISON: Add invalidate_inode_page
    HWPOISON: Refactor truncate to allow direct truncating of page v2
    HWPOISON: check and isolate corrupted free pages v2
    HWPOISON: Handle hardware poisoned pages in try_to_unmap
    HWPOISON: Use bitmask/action code for try_to_unmap behaviour
    HWPOISON: x86: Add VM_FAULT_HWPOISON handling to x86 page fault handler v2
    HWPOISON: Add poison check to page fault handling
    HWPOISON: Add basic support for poisoned pages in fault handler v3
    HWPOISON: Add new SIGBUS error codes for hardware poison signals
    HWPOISON: Add support for poison swap entries v2
    HWPOISON: Export some rmap vma locking to outside world
    ...

    Linus Torvalds
     
  • * remove asm/atomic.h inclusion from linux/utsname.h --
    not needed after kref conversion
    * remove linux/utsname.h inclusion from files which do not need it

    NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however
    due to some personality stuff it _is_ needed -- cowardly leave ELF-related
    headers and files alone.

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

    Alexey Dobriyan
     

21 Sep, 2009

1 commit


16 Sep, 2009

1 commit

  • Enable removing of corrupted pages through truncation
    for a bunch of file systems: ext*, xfs, gfs2, ocfs2, ntfs
    These should cover most server needs.

    I chose the set of migration aware file systems for this
    for now, assuming they have been especially audited.
    But in general it should be safe for all file systems
    on the data area that support read/write and truncate.

    Caveat: the hardware error handler does not take i_mutex
    for now before calling the truncate function. Is that ok?

    Cc: tytso@mit.edu
    Cc: hch@infradead.org
    Cc: mfasheh@suse.com
    Cc: aia21@cantab.net
    Cc: hugh.dickins@tiscali.co.uk
    Cc: swhiteho@redhat.com
    Signed-off-by: Andi Kleen

    Andi Kleen
     

15 Sep, 2009

1 commit

  • * 'for-2.6.32' of git://git.kernel.dk/linux-2.6-block: (29 commits)
    block: use blkdev_issue_discard in blk_ioctl_discard
    Make DISCARD_BARRIER and DISCARD_NOBARRIER writes instead of reads
    block: don't assume device has a request list backing in nr_requests store
    block: Optimal I/O limit wrapper
    cfq: choose a new next_req when a request is dispatched
    Seperate read and write statistics of in_flight requests
    aoe: end barrier bios with EOPNOTSUPP
    block: trace bio queueing trial only when it occurs
    block: enable rq CPU completion affinity by default
    cfq: fix the log message after dispatched a request
    block: use printk_once
    cciss: memory leak in cciss_init_one()
    splice: update mtime and atime on files
    block: make blk_iopoll_prep_sched() follow normal 0/1 return convention
    cfq-iosched: get rid of must_alloc flag
    block: use interrupts disabled version of raise_softirq_irqoff()
    block: fix comment in blk-iopoll.c
    block: adjust default budget for blk-iopoll
    block: fix long lines in block/blk-iopoll.c
    block: add blk-iopoll, a NAPI like approach for block devices
    ...

    Linus Torvalds
     

14 Sep, 2009

1 commit