1. 05 Jan, 2009 17 commits
    • Steven Whitehouse's avatar
      GFS2: Move gfs2_recoverd into recovery.c · 9ac1b4d9
      Steven Whitehouse authored
      By moving gfs2_recoverd, we can make an additional function static
      and it also leaves only (the already scheduled for removal) gfs2_glockd
      in daemon.c.
      
      At the same time the declaration of gfs2_quotad is moved to quota.h
      to reflect the new location of gfs2_quotad in a previous patch. Also
      the recovery.h and quota.h headers are cleaned up.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      9ac1b4d9
    • Steven Whitehouse's avatar
      GFS2: Fix "truncate in progress" hang · 813e0c46
      Steven Whitehouse authored
      Following on from the recent clean up of gfs2_quotad, this patch moves
      the processing of "truncate in progress" inodes from the glock workqueue
      into gfs2_quotad. This fixes a hang due to the "truncate in progress"
      processing requiring glocks in order to complete.
      
      It might seem odd to use gfs2_quotad for this particular item, but
      we have to use a pre-existing thread since creating a thread implies
      a GFP_KERNEL memory allocation which is not allowed from the glock
      workqueue context. Of the existing threads, gfs2_logd and gfs2_recoverd
      may deadlock if used for this operation. gfs2_scand and gfs2_glockd are
      both scheduled for removal at some (hopefully not too distant) future
      point. That leaves only gfs2_quotad whose workload is generally fairly
      light and is easily adapted for this extra task.
      
      Also, as a result of this change, it opens the way for a future patch to
      make the reading of the inode's information asynchronous with respect to
      the glock workqueue, which is another improvement that has been on the list
      for some time now.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      813e0c46
    • Steven Whitehouse's avatar
      GFS2: Clean up & move gfs2_quotad · 37b2c837
      Steven Whitehouse authored
      This patch is a clean up of gfs2_quotad prior to giving it an
      extra job to do in addition to the current portfolio of updating
      the quota and statfs information from time to time.
      
      As a result it has been moved into quota.c allowing one of the
      functions it calls to be made static. Also the clean up allows
      the two existing functions to have separate timeouts and also
      to coexist with its future role of dealing with the "truncate in
      progress" inode flag.
      
      The (pointless) setting of gfs2_quotad_secs is removed since we
      arrange to only wake up quotad when one of the two timers expires.
      
      In addition the struct gfs2_quota_data is moved into a slab cache,
      mainly for easier debugging. It should also be possible to use
      a shrinker in the future, rather than the current scheme of scanning
      the quota data entries from time to time.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      37b2c837
    • Steven Whitehouse's avatar
      GFS2: Add more detail to debugfs glock dumps · fa75cedc
      Steven Whitehouse authored
      Although the glock dumps print quite a lot of information about
      the glocks themselves, there are more things which can be
      usefully added to the dump realting to the objects themselves.
      
      This patch adds a few more fields to the inode and resource
      group lines, which should be useful for debugging.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      fa75cedc
    • Steven Whitehouse's avatar
      GFS2: Banish struct gfs2_rgrpd_host · 73f74948
      Steven Whitehouse authored
      This patch moves the final field so that we can get rid
      of struct gfs2_rgrpd_host, as promised some time ago. Also
      by rearranging the fields slightly, we are able to reduce
      the size of the gfs2_rgrpd structure at the same time.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      73f74948
    • Steven Whitehouse's avatar
      GFS2: Move rg_free from gfs2_rgrpd_host to gfs2_rgrpd · cfc8b549
      Steven Whitehouse authored
      The second of three fields which need to move, in order
      to remove the struct gfs2_rgrpd_host.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      cfc8b549
    • Steven Whitehouse's avatar
      GFS2: Move rg_igeneration into struct gfs2_rgrpd · d8b71f73
      Steven Whitehouse authored
      This moves one of the fields of struct gfs2_rgrpd_host into
      the struct gfs2_rgrpd with the eventual aim of removing
      the struct rgrpd_host completely.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      d8b71f73
    • Steven Whitehouse's avatar
      GFS2: Banish struct gfs2_dinode_host · 383f01fb
      Steven Whitehouse authored
      The final field in gfs2_dinode_host was the i_flags field. Thats
      renamed to i_diskflags in order to avoid confusion with the existing
      inode flags, and moved into the inode proper at a suitable location
      to avoid creating a "hole".
      
      At that point struct gfs2_dinode_host is no longer needed and as
      promised (quite some time ago!) it can now be removed completely.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      383f01fb
    • Steven Whitehouse's avatar
      GFS2: Move i_size from gfs2_dinode_host and rename it to i_disksize · c9e98886
      Steven Whitehouse authored
      This patch moved the i_size field from the gfs2_dinode_host and
      following the ext3 convention renames it i_disksize.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      c9e98886
    • Steven Whitehouse's avatar
      GFS2: Move di_eattr into "proper" inode · 3767ac21
      Steven Whitehouse authored
      This moves the di_eattr field out of gfs2_inode_host and
      into the inode proper.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      3767ac21
    • Steven Whitehouse's avatar
      GFS2: Move "entries" into "proper" inode · ad6203f2
      Steven Whitehouse authored
      This moves the directory entry count into the proper inode.
      Potentially we could get this to share the space used by
      something else in the future, but this is one more step
      on the way to removing the gfs2_dinode_host structure.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      ad6203f2
    • Steven Whitehouse's avatar
      GFS2: Move generation number into "proper" part of inode · bcf0b5b3
      Steven Whitehouse authored
      This moves the generation number from the gfs2_dinode_host
      into the gfs2_inode structure. Eventually the plan is to get
      rid of the gfs2_dinode_host structure completely.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      bcf0b5b3
    • Harvey Harrison's avatar
      GFS2: sparse annotation of gl->gl_spin · 55ba474d
      Harvey Harrison authored
      fs/gfs2/glock.c:308:5: warning: context problem in 'do_promote': '_spin_unlock' expected different context
      fs/gfs2/glock.c:308:5:    context '*gl+28': wanted >= 1, got 0
      fs/gfs2/glock.c:529:2: warning: context problem in 'do_xmote': '_spin_unlock' expected different context
      fs/gfs2/glock.c:529:2:    context '*gl+28': wanted >= 1, got 0
      fs/gfs2/glock.c:925:3: warning: context problem in 'add_to_queue': '_spin_unlock' expected different context
      fs/gfs2/glock.c:925:3:    context '*gl+28': wanted >= 1, got 0
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      55ba474d
    • Steven Whitehouse's avatar
      GFS2: Fix up jdata writepage/delete_inode · 1bb7322f
      Steven Whitehouse authored
      There is a bug in writepage and delete_inode which allows jdata files to
      invalidate pages from the address space without being in a transaction at
      the time. This causes problems in case the pages are in the journal. This
      patch fixes that case and prevents the resulting oops.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      1bb7322f
    • Steven Whitehouse's avatar
      GFS2: Rationalise header files · b2760583
      Steven Whitehouse authored
      Move the contents of some headers which contained very
      little into more sensible places, and remove the original
      header files. This should make it easier to find things.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      b2760583
    • Steven Whitehouse's avatar
      GFS2: Support for FIEMAP ioctl · e9079cce
      Steven Whitehouse authored
      This patch implements the FIEMAP ioctl for GFS2. We can use the generic
      code (aside from a lock order issue, solved as per Ted Tso's suggestion)
      for which I've introduced a new variant of the generic function. We also
      have one exception to deal with, namely stuffed files, so we do that
      "by hand", setting all the required flags.
      
      This has been tested with a modified (I could only find an old version) of
      Eric's test program, and appears to work correctly.
      
      This patch does not currently support FIEMAP of xattrs, but the plan is to add
      that feature at some future point.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Cc: Theodore Tso <tytso@mit.edu>
      Cc: Eric Sandeen <sandeen@redhat.com>
      e9079cce
    • Linus Torvalds's avatar
      Merge branch 'audit.b61' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current · fe0bdec6
      Linus Torvalds authored
      * 'audit.b61' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
        audit: validate comparison operations, store them in sane form
        clean up audit_rule_{add,del} a bit
        make sure that filterkey of task,always rules is reported
        audit rules ordering, part 2
        fixing audit rule ordering mess, part 1
        audit_update_lsm_rules() misses the audit_inode_hash[] ones
        sanitize audit_log_capset()
        sanitize audit_fd_pair()
        sanitize audit_mq_open()
        sanitize AUDIT_MQ_SENDRECV
        sanitize audit_mq_notify()
        sanitize audit_mq_getsetattr()
        sanitize audit_ipc_set_perm()
        sanitize audit_ipc_obj()
        sanitize audit_socketcall
        don't reallocate buffer in every audit_sockaddr()
      fe0bdec6
  2. 04 Jan, 2009 23 commits