1. 24 3月, 2009 24 次提交
    • S
      GFS2: Clean up of glops.c · 6bac243f
      Steven Whitehouse 提交于
      This cleans up a number of bits of code mostly based in glops.c.
      A couple of simple functions have been merged into the callers
      to make it more obvious what is going on, the mysterious raising
      of i_writecount around the truncate_inode_pages() call has been
      removed. The meta_go_* operations have been renamed rgrp_go_*
      since that is the only lock type that they are used with.
      
      The unused argument of gfs2_read_sb has been removed. Also
      a bug has been fixed where a check for the rindex inode was
      in the wrong callback. More comments are added, and the
      debugging code is improved too.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      6bac243f
    • B
      GFS2: Fix locking bug in failed shared to exclusive conversion · 02ffad08
      Benjamin Marzinski 提交于
      After calling out to the dlm, GFS2 sets the new state of a glock to
      gl_target in gdlm_ast().  However, gl_target is not always the lock
      state that was requested. If a conversion from shared to exclusive
      fails, finish_xmote() will call do_xmote() with LM_ST_UNLOCKED, instead
      of gl->gl_target, so that it can reacquire the lock in exlusive the next
      time around.  In this case, setting the lock to gl_target in gdlm_ast()
      will make GFS2 think that it has the glock in exclusive mode, when
      really, it doesn't have the glock locked at all.  This patch adds a new
      field to the gfs2_glock structure, gl_req, to track the mode that was
      requested.
      Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      02ffad08
    • H
      GFS2: Pagecache usage optimization on GFS2 · 229615de
      Hisashi Hifumi 提交于
      I introduced "is_partially_uptodate" aops for GFS2.
      
      A page can have multiple buffers and even if a page is not uptodate, some buffers
      can be uptodate on pagesize != blocksize environment.
      This aops checks that all buffers which correspond to a part of a file
      that we want to read are uptodate. If so, we do not have to issue actual
      read IO to HDD even if a page is not uptodate because the portion we
      want to read are uptodate.
      "block_is_partially_uptodate" function is already used by ext2/3/4.
      With the following patch random read/write mixed workloads or random read after
      random write workloads can be optimized and we can get performance improvement.
      
      I did a performance test using the sysbench.
      
      #sysbench --num-threads=16 --max-requests=200000 --test=fileio --file-num=1
      --file-block-size=8K --file-total-size=2G --file-test-mode=rndrw --file-fsync-freq=0
      --file-rw-ratio=1 run
      
      -2.6.29-rc6
      Test execution summary:
          total time:                          202.6389s
          total number of events:              200000
          total time taken by event execution: 2580.0480
          per-request statistics:
               min:                            0.0000s
               avg:                            0.0129s
               max:                            49.5852s
               approx.  95 percentile:         0.0462s
      
      -2.6.29-rc6-patched
      Test execution summary:
          total time:                          177.8639s
          total number of events:              200000
          total time taken by event execution: 2419.0199
          per-request statistics:
               min:                            0.0000s
               avg:                            0.0121s
               max:                            52.4306s
               approx.  95 percentile:         0.0444s
      
      arch: ia64
      pagesize: 16k
      blocksize: 4k
      Signed-off-by: NHisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      229615de
    • H
      GFS2: fix sparse warning: Should it be static? · 02ab1721
      Hannes Eder 提交于
      Impact: Make symbol static.
      
      Fix this sparse warning:
        fs/gfs2/rgrp.c:188:5: warning: symbol 'gfs2_bitfit' was not declared. Should it be static?
      Signed-off-by: NHannes Eder <hannes@hanneseder.net>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      02ab1721
    • H
      GFS2: fix sparse warnings: constant is so big it is ... · 075ac448
      Hannes Eder 提交于
      Fix this sparse warnings:
        fs/gfs2/rgrp.c:156:23: warning: constant 0xffffffffffffffff is so big it is unsigned long long
        fs/gfs2/rgrp.c:157:23: warning: constant 0xaaaaaaaaaaaaaaaa is so big it is unsigned long long
        fs/gfs2/rgrp.c:158:23: warning: constant 0x5555555555555555 is so big it is long long
        fs/gfs2/rgrp.c:194:20: warning: constant 0x5555555555555555 is so big it is long long
        fs/gfs2/rgrp.c:204:44: warning: constant 0x5555555555555555 is so big it is long long
      Signed-off-by: NHannes Eder <hannes@hanneseder.net>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      075ac448
    • S
      GFS2: Support quota/noquota mount arguments · b9a96945
      Steven Whitehouse 提交于
      This adds support for "quota" and "noquota" mount options in addition to the
      existing "quota=on/off/account" so that we are compatible with the names by
      which these options are more generally known.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b9a96945
    • S
      GFS2: Fix alignment issue and tidy gfs2_bitfit · 223b2b88
      Steven Whitehouse 提交于
      An alignment issue with the existing bitfit algorithm was reported
      on IA64. This patch attempts to fix that, and also to tidy up the
      code a bit. There is now more documentation about how this works
      and it has survived a number of different tests.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      223b2b88
    • S
      GFS2: Add a "demote a glock" interface to sysfs · 64d576ba
      Steven Whitehouse 提交于
      This adds a sysfs file called demote_rq to GFS2's
      per filesystem directory. Its possible to use this
      file to demote arbitrary glocks in exactly the same
      way as if a request had come in from a remote node.
      
      This is intended for testing issues relating to caching
      of data under glocks. Despite that, the interface is
      generic enough to send requests to any type of glock,
      but be careful as its not always safe to send an
      arbitrary message to an arbitrary glock. For that reason
      and to prevent DoS, this interface is restricted to root
      only.
      
      The messages look like this:
      
      <type>:<glocknumber> <mode>
      
      Example:
      
      echo -n "2:13324 EX" >/sys/fs/gfs2/unity:myfs/demote_rq
      
      Which means "please demote inode glock (type 2) number 13324 so that
      I can get an EX (exclusive) lock". The lock modes are those which
      would normally be sent by a remote node in its callback so if you
      want to unlock a glock, you use EX, to demote to shared, use SH or PR
      (depending on whether you like GFS2 or DLM lock modes better!).
      
      If the glock doesn't exist, you'll get -ENOENT returned. If the
      arguments don't make sense, you'll get -EINVAL returned.
      
      The plan is that this interface will be used in combination with
      the blktrace patch which I recently posted for comments although
      it is, of course, still useful in its own right.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      64d576ba
    • S
      GFS2: Expose UUID via sysfs/uevent · 02e3cc70
      Steven Whitehouse 提交于
      Since we have a UUID, we ought to expose it to the user via sysfs
      and uevents. We already have the fs name in both of these places
      (a combination of the lock proto and lock table name) so if we add
      the UUID as well, we have a full set.
      
      For older filesystems (i.e. those created before mkfs.gfs2 was writing
      UUIDs by default) the sysfs file will appear zero length, and no UUID
      env var will be added to the uevents.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      02e3cc70
    • S
      GFS2: Support generation of discard requests · f15ab561
      Steven Whitehouse 提交于
      This patch allows GFS2 to generate discard requests for blocks which are
      no longer useful to the filesystem (i.e. those which have been freed as
      the result of an unlink operation). The requests are generated at the
      time which those blocks become available for reuse in the filesystem.
      
      In order to use this new feature, you have to specify the "discard"
      mount option. The code coalesces adjacent blocks into a single extent
      when generating the discard requests, thus generating the minimum
      number.
      
      If an error occurs when the request has been sent to the block device,
      then it will print a message and turn off the requests for that
      filesystem. If the problem is temporary, then you can use remount to
      turn the option back on again. There is also a nodiscard mount option
      so that you can use remount to turn discard requests off, if required.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f15ab561
    • S
      GFS2: Fix deadlock on journal flush · d8348de0
      Steven Whitehouse 提交于
      This patch fixes a deadlock when the journal is flushed and there
      are dirty inodes other than the one which caused the journal flush.
      Originally the journal flushing code was trying to obtain the
      transaction glock while running the flush code for an inode glock.
      We no longer require the transaction glock at this point in time
      since we know that any attempt to get the transaction glock from
      another node will result in a journal flush. So if we are flushing
      the journal, we can be sure that the transaction lock is still
      cached from when the transaction was started.
      
      By inlining a version of gfs2_trans_begin() (minus the bit which
      gets the transaction glock) we can avoid the deadlock problems
      caused if there is a demote request queued up on the transaction
      glock.
      
      In addition I've also moved the umount rwsem so that it covers
      the glock workqueue, since it all demotions are done by this
      workqueue now. That fixes a bug on umount which I came across
      while fixing the original problem.
      Reported-by: NDavid Teigland <teigland@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      d8348de0
    • S
      GFS2: Fix error path ref counting for root inode · e7c8707e
      Steven Whitehouse 提交于
      We were keeping hold of an extra ref to the root inode in one
      of the error paths, that resulted in a hang.
      Reported-by: NNate Straz <nstraz@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Tested-by: NRobert Peterson <rpeterso@redhat.com>
      e7c8707e
    • S
      GFS2: Remove unused field from glock · ac2425e7
      Steven Whitehouse 提交于
      The time stamp field is unused in the glock now that we are
      using a shrinker, so that we can remove it and save sizeof(unsigned long)
      bytes in each glock.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      ac2425e7
    • S
      GFS2: Merge lock_dlm module into GFS2 · f057f6cd
      Steven Whitehouse 提交于
      This is the big patch that I've been working on for some time
      now. There are many reasons for wanting to make this change
      such as:
       o Reducing overhead by eliminating duplicated fields between structures
       o Simplifcation of the code (reduces the code size by a fair bit)
       o The locking interface is now the DLM interface itself as proposed
         some time ago.
       o Fewer lookups of glocks when processing replies from the DLM
       o Fewer memory allocations/deallocations for each glock
       o Scope to do further optimisations in the future (but this patch is
         more than big enough for now!)
      
      Please note that (a) this patch relates to the lock_dlm module and
      not the DLM itself, that is still a separate module; and (b) that
      we retain the ability to build GFS2 as a standalone single node
      filesystem with out requiring the DLM.
      
      This patch needs a lot of testing, hence my keeping it I restarted
      my -git tree after the last merge window. That way, this has the maximum
      exposure before its merged. This is (modulo a few minor bug fixes) the
      same patch that I've been posting on and off the the last three months
      and its passed a number of different tests so far.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f057f6cd
    • S
      GFS2: Remove "double" locking in quota · 22077f57
      Steven Whitehouse 提交于
      We only really need a single spin lock for the quota data, so
      lets just use the lru lock for now.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Abhijith Das <adas@redhat.com>
      22077f57
    • A
      GFS2: change gfs2_quota_scan into a shrinker · 0a7ab79c
      Abhijith Das 提交于
      Deallocation of gfs2_quota_data objects now happens on-demand through a
      shrinker instead of routinely deallocating through the quotad daemon.
      Signed-off-by: NAbhijith Das <adas@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      0a7ab79c
    • A
      GFS2: Bring back lvb-related stuff to lock_nolock to support quotas · 2db2aac2
      Abhijith Das 提交于
      The quota code uses lvbs and this is currently not implemented in
      lock_nolock, thereby causing panics when quota is enabled with
      lock_nolock. This patch adds the relevant bits.
      Signed-off-by: NAbhijith Das <adas@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      2db2aac2
    • S
      GFS2: Fix remount argument parsing · 6f04c1c7
      Steven Whitehouse 提交于
      The following patch fixes an issue relating to remount and argument
      parsing. After this fix is applied, remount becomes atomic in that
      it either succeeds changing the mount to the new state, or it fails
      and leaves it in the old state. Previously it was possible for the
      parsing of options to fail part way though and for the fs to be left
      in a state where some of the new arguments had been applied, but some
      had not.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      6f04c1c7
    • L
      Linux 2.6.29 · 8e0ee43b
      Linus Torvalds 提交于
      8e0ee43b
    • K
      Build with -fno-dwarf2-cfi-asm · 00308649
      Kyle McMartin 提交于
      With a sufficiently new compiler and binutils, code which wasn't
      previously generating .eh_frame sections has begun to.  Certain
      architectures (powerpc, in this case) may generate unexpected relocation
      formats in response to this, preventing modules from loading.
      
      While the new relocation types should probably be handled, revert to the
      previous behaviour with regards to generation of .eh_frame sections.
      
      (This was reported against Fedora, which appears to be the only distro
      doing any building against gcc-4.4 at present: RH bz#486545.)
      Signed-off-by: NKyle McMartin <kyle@redhat.com>
      Acked-by: NRoland McGrath <roland@redhat.com>
      Cc: Alexandre Oliva <aoliva@redhat.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      00308649
    • J
      trivial: fix orphan dates in ext2 documentation · 1db4b2d2
      Jody McIntyre 提交于
      Revert the change to the orphan dates of Windows 95, DOS, compression.
      Add a new orphan date for OS/2.
      Signed-off-by: NJody McIntyre <scjody@sun.com>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1db4b2d2
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · d56ffd38
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
        ucc_geth: Fix oops when using fixed-link support
        dm9000: locking bugfix
        net: update dnet.c for bus_id removal
        dnet: DNET should depend on HAS_IOMEM
        dca: add missing copyright/license headers
        nl80211: Check that function pointer != NULL before using it
        sungem: missing net_device_ops
        be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle
        be2net: replenish when posting to rx-queue is starved in out of mem conditions
        bas_gigaset: correctly allocate USB interrupt transfer buffer
        smsc911x: reset last known duplex and carrier on open
        sh_eth: Fix mistake of the address of SH7763
        sh_eth: Change handling of IRQ
        netns: oops in ip[6]_frag_reasm incrementing stats
        net: kfree(napi->skb) => kfree_skb
        net: fix sctp breakage
        ipv6: fix display of local and remote sit endpoints
        net: Document /proc/sys/net/core/netdev_budget
        tulip: fix crash on iface up with shirq debug
        virtio_net: Make virtio_net support carrier detection
        ...
      d56ffd38
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 · 12a37b5e
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
        sparc64: Fix crash with /proc/iomem
        sparc64: Reschedule KGDB capture to a software interrupt.
        sbus: Auto-load openprom module when device opened.
      12a37b5e
    • M
      fix ptrace slowness · 53da1d94
      Miklos Szeredi 提交于
      This patch fixes bug #12208:
      
        Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=12208
        Subject         : uml is very slow on 2.6.28 host
      
      This turned out to be not a scheduler regression, but an already
      existing problem in ptrace being triggered by subtle scheduler
      changes.
      
      The problem is this:
      
       - task A is ptracing task B
       - task B stops on a trace event
       - task A is woken up and preempts task B
       - task A calls ptrace on task B, which does ptrace_check_attach()
       - this calls wait_task_inactive(), which sees that task B is still on the runq
       - task A goes to sleep for a jiffy
       - ...
      
      Since UML does lots of the above sequences, those jiffies quickly add
      up to make it slow as hell.
      
      This patch solves this by not rescheduling in read_unlock() after
      ptrace_stop() has woken up the tracer.
      
      Thanks to Oleg Nesterov and Ingo Molnar for the feedback.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      CC: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      53da1d94
  2. 23 3月, 2009 11 次提交
  3. 22 3月, 2009 2 次提交
  4. 21 3月, 2009 2 次提交
  5. 20 3月, 2009 1 次提交