1. 19 10月, 2005 5 次提交
    • T
      NFSv4: Fix a potential CLOSE race · 9512135d
      Trond Myklebust 提交于
       Once the state_owner and lock_owner semaphores get removed, it will be
       possible for other OPEN requests to reopen the same file if they have
       lower sequence ids than our CLOSE call.
       This patch ensures that we recheck the file state once
       nfs_wait_on_sequence() has completed waiting.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      9512135d
    • T
      NFSv4: Add functions to order RPC calls · cee54fc9
      Trond Myklebust 提交于
       NFSv4 file state-changing functions such as OPEN, CLOSE, LOCK,... are all
       labelled with "sequence identifiers" in order to prevent the server from
       reordering RPC requests, as this could cause its file state to
       become out of sync with the client.
      
       Currently the NFS client code enforces this ordering locally using
       semaphores to restrict access to structures until the RPC call is done.
       This, of course, only works with synchronous RPC calls, since the
       user process must first grab the semaphore.
       By dropping semaphores, and instead teaching the RPC engine to hold
       the RPC calls until they are ready to be sent, we can extend this
       process to work nicely with asynchronous RPC calls too.
      
       This patch adds a new list called "rpc_sequence" that defines the order
       of the RPC calls to be sent. We add one such list for each state_owner.
       When an RPC call is ready to be sent, it checks if it is top of the
       rpc_sequence list. If so, it proceeds. If not, it goes back to sleep,
       and loops until it hits top of the list.
       Once the RPC call has completed, it can then bump the sequence id counter,
       and remove itself from the rpc_sequence list, and then wake up the next
       sleeper.
      
       Note that the state_owner sequence ids and lock_owner sequence ids are
       all indexed to the same rpc_sequence list, so OPEN, LOCK,... requests
       are all ordered w.r.t. each other.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      cee54fc9
    • T
      RPC: allow call_encode() to delay transmission of an RPC call. · 5e5ce5be
      Trond Myklebust 提交于
       Currently, call_encode will cause the entire RPC call to abort if it returns
       an error. This is unnecessarily rigid, and gets in the way of attempts
       to allow the NFSv4 layer to order RPC calls that carry sequence ids.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5e5ce5be
    • C
      SUNRPC: Retry rpcbind requests if the server's portmapper isn't up · ea635a51
      Chuck Lever 提交于
       After a server crash/reboot, rebinding should always retry, otherwise
       requests on "hard" mounts will fail when they shouldn't.
      
       Test plan:
       Run a lock-intensive workload against a server while rebooting the server
       repeatedly.
      Signed-off-by: NChuck Lever <cel@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ea635a51
    • T
      cff6bf97
  2. 18 10月, 2005 14 次提交
  3. 17 10月, 2005 5 次提交
    • R
      [PATCH] fix black/white-only svideo input in vpx3220 decoder · de21eb63
      Ronald S. Bultje 提交于
      Fix the fact that the svideo input will only give input in black/white in
      some circumstances.  Reason is that in the PCI controller driver (zr36067),
      after setting input, we reset norm, which overwrites the input register
      with the default.  This patch makes it always set the correct value for the
      input when changing norm.
      Signed-off-by: NRonald S. Bultje <rbultje@ronald.bitfreak.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      de21eb63
    • R
      [PATCH] fix vpx3220 offset issue in SECAM · 9b3acc21
      Ronald S. Bultje 提交于
      Fix bug #5404 in kernel bugzilla.
      
      It basically updates the vpx3220 initialization tables with some newer
      values that we've had in CVS for a while (and that, for some reason, never
      ended up in the kernel...  must've gotten lost).  Those fix a ~16 pixels
      noise at the top of the picture in at least SECAM, although (now that I
      think about it) PAL was probably affected, also.
      Signed-off-by: NRonald S. Bultje <rbultje@ronald.bitfreak.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9b3acc21
    • S
      [PATCH] SVGATextMode fix · 0aec4867
      Samuel Thibault 提交于
      Fix bug 5441.
      
      I didn't know about messy programs like svgatextmode...  Couldn't this be
      integrated in some linux/drivers/video/console/svgacon.c ?...  So because
      of the existence of the svgatextmode program, the kernel is not supposed to
      touch to CRT_OVERFLOW/SYNC_END/DISP/DISP_END/OFFSET ?
      
      Disabling the check in vgacon_resize() might help indeed, but I'm really
      not sure whether it will work for any chipset: in my patch, CRT registers
      are set at each console switch, since stty rows/cols apply to consoles
      separately...
      
      The attached solution is to keep the test, but if it fails, we assume that
      the caller knows what it does (i.e.  it is svgatextmode) and then disable
      any further call to vgacon_doresize.  Svgatextmode is usually used to
      _expand_ the display, not to shrink it.  And it is harmless in the case of
      a too big stty rows/cols: the display will just be cropped.  I tested it on
      my laptop, and it works fine with svgatextmode.
      
      A better solution would be that svgatextmode explicitely tells the kernel
      not to care about video timing, but for this an interface needs be defined
      and svgatextmode be patched.
      Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0aec4867
    • H
      [PATCH] list: add missing rcu_dereference on first element · b24d18aa
      Herbert Xu 提交于
      It seems that all the list_*_rcu primitives are missing a memory barrier
      on the very first dereference.  For example,
      
      #define list_for_each_rcu(pos, head) \
      	for (pos = (head)->next; prefetch(pos->next), pos != (head); \
      		pos = rcu_dereference(pos->next))
      
      It will go something like:
      
      	pos = (head)->next
      
      	prefetch(pos->next)
      
      	pos != (head)
      
      	do stuff
      
      We're missing a barrier here.
      
      	pos = rcu_dereference(pos->next)
      
      		fetch pos->next
      
      		barrier given by rcu_dereference(pos->next)
      
      		store pos
      
      Without the missing barrier, the pos->next value may turn out to be stale.
      In fact, if "do stuff" were also dereferencing pos and relying on
      list_for_each_rcu to provide the barrier then it may also break.
      
      So here is a patch to make sure that we have a barrier for the first
      element in the list.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: N"Paul E. McKenney" <paulmck@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b24d18aa
    • L
      Fix memory ordering bug in page reclaim · 3d80636a
      Linus Torvalds 提交于
      As noticed by Nick Piggin, we need to make sure that we check the page
      count before we check for PageDirty, since the dirty check is only valid
      if the count implies that we're the only possible ones holding the page.
      
      We always did do this, but the code needs a read-memory-barrier to make
      sure that the orderign is also honored by the CPU.
      
      (The writer side is ordered due to the atomic decrement and test on the
      page count, see the discussion on linux-kernel)
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3d80636a
  4. 16 10月, 2005 2 次提交
  5. 15 10月, 2005 14 次提交