1. 18 12月, 2009 4 次提交
  2. 16 12月, 2009 2 次提交
  3. 15 12月, 2009 7 次提交
  4. 12 12月, 2009 2 次提交
  5. 11 12月, 2009 1 次提交
  6. 10 12月, 2009 1 次提交
    • C
      vfs: Implement proper O_SYNC semantics · 6b2f3d1f
      Christoph Hellwig 提交于
      While Linux provided an O_SYNC flag basically since day 1, it took until
      Linux 2.4.0-test12pre2 to actually get it implemented for filesystems,
      since that day we had generic_osync_around with only minor changes and the
      great "For now, when the user asks for O_SYNC, we'll actually give
      O_DSYNC" comment.  This patch intends to actually give us real O_SYNC
      semantics in addition to the O_DSYNC semantics.  After Jan's O_SYNC
      patches which are required before this patch it's actually surprisingly
      simple, we just need to figure out when to set the datasync flag to
      vfs_fsync_range and when not.
      
      This patch renames the existing O_SYNC flag to O_DSYNC while keeping it's
      numerical value to keep binary compatibility, and adds a new real O_SYNC
      flag.  To guarantee backwards compatiblity it is defined as expanding to
      both the O_DSYNC and the new additional binary flag (__O_SYNC) to make
      sure we are backwards-compatible when compiled against the new headers.
      
      This also means that all places that don't care about the differences can
      just check O_DSYNC and get the right behaviour for O_SYNC, too - only
      places that actuall care need to check __O_SYNC in addition.  Drivers and
      network filesystems have been updated in a fail safe way to always do the
      full sync magic if O_DSYNC is set.  The few places setting O_SYNC for
      lower layers are kept that way for now to stay failsafe.
      
      We enforce that O_DSYNC is set when __O_SYNC is set early in the open path
      to make sure we always get these sane options.
      
      Note that parisc really screwed up their headers as they already define a
      O_DSYNC that has always been a no-op.  We try to repair it by using it for
      the new O_DSYNC and redefinining O_SYNC to send both the traditional
      O_SYNC numerical value _and_ the O_DSYNC one.
      
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Grant Grundler <grundler@parisc-linux.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andreas Dilger <adilger@sun.com>
      Acked-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Acked-by: NKyle McMartin <kyle@mcmartin.ca>
      Acked-by: NUlrich Drepper <drepper@redhat.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      6b2f3d1f
  7. 04 12月, 2009 1 次提交
  8. 01 12月, 2009 4 次提交
    • T
      alpha: Fixup last users of irq_chip->typename · 8ab1221c
      Thomas Gleixner 提交于
      The typename member of struct irq_chip was kept for migration purposes
      and is obsolete since more than 2 years. Fix up the leftovers.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: linux-alpha@vger.kernel.org
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      8ab1221c
    • M
      Alpha: Rearrange thread info flags fixing two regressions · 745dd240
      Michael Cree 提交于
      The removal of the TIF_NOTIFY_RESUME flag, commit a583f1b5
      "remove unused TIF_NOTIFY_RESUME flag," resulted in incorrect
      setting of the unaligned access control flags by the prctl syscall.
      
      The re-addition of the TIF_NOTIFY_RESUME flag, commit d0420c83
      "KEYS: Extend TIF_NOTIFY_RESUME to (almost) all architectures [try #6]"
      further caused problems, namely incorrect operands to assembler code
      as evidenced by:
      
      AS      arch/alpha/kernel/entry.o
      arch/alpha/kernel/entry.S: Assembler messages:
      arch/alpha/kernel/entry.S:326: Warning: operand out of range
      (0x0000000000000406 is not between 0x0000000000000000 and
      0x00000000000000ff)
      
      Both regressions fixed by (1) rearranging TIF_NOTIFY_RESUME flag to be
      in lower 8 bits of the thread info flags, and (2) making sure that
      ALPHA_UAC_SHIFT matches the rearrangement of the thread info flags.
      Signed-off-by: NMichael Cree <mcree@orcon.net.nz>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: David Howells <dhowells@redhat.com>,
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      745dd240
    • J
      arch/alpha/kernel: Add kmalloc NULL tests · cc9a2c83
      Julia Lawall 提交于
      Check that the result of kmalloc is not NULL before passing it to other
      functions.
      
      The semantic match that finds this problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@
      expression *x;
      identifier f;
      constant char *C;
      @@
      
      x = \(kmalloc\|kcalloc\|kzalloc\)(...);
      ... when != x == NULL
          when != x != NULL
          when != (x || ...)
      (
      kfree(x)
      f(...,C,...,x,...)
      |
      *f(...,x,...)
      |
      *x->f
      )
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      cc9a2c83
    • J
      arch/alpha/kernel/sys_ruffian.c: Use DIV_ROUND_CLOSEST · 04d8a9db
      Julia Lawall 提交于
      The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
      but is perhaps more readable.
      
      The semantic patch that makes this change is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @haskernel@
      @@
      
      @depends on haskernel@
      expression x,__divisor;
      @@
      
      - (((x) + ((__divisor) / 2)) / (__divisor))
      + DIV_ROUND_CLOSEST(x,__divisor)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Signed-off-by: NMatt Turner <mattst88@gmail.com>
      04d8a9db
  9. 26 11月, 2009 1 次提交
    • I
      block: add helpers to run flush_dcache_page() against a bio and a request's pages · 2d4dc890
      Ilya Loginov 提交于
      Mtdblock driver doesn't call flush_dcache_page for pages in request.  So,
      this causes problems on architectures where the icache doesn't fill from
      the dcache or with dcache aliases.  The patch fixes this.
      
      The ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE symbol was introduced to avoid
      pointless empty cache-thrashing loops on architectures for which
      flush_dcache_page() is a no-op.  Every architecture was provided with this
      flush pages on architectires where ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE is
      equal 1 or do nothing otherwise.
      
      See "fix mtd_blkdevs problem with caches on some architectures" discussion
      on LKML for more information.
      Signed-off-by: NIlya Loginov <isloginov@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Peter Horton <phorton@bitbox.co.uk>
      Cc: "Ed L. Cashin" <ecashin@coraid.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      2d4dc890
  10. 18 11月, 2009 1 次提交
  11. 16 11月, 2009 1 次提交
  12. 15 11月, 2009 1 次提交
  13. 12 11月, 2009 2 次提交
  14. 13 10月, 2009 2 次提交
    • A
      net: Introduce recvmmsg socket syscall · a2e27255
      Arnaldo Carvalho de Melo 提交于
      Meaning receive multiple messages, reducing the number of syscalls and
      net stack entry/exit operations.
      
      Next patches will introduce mechanisms where protocols that want to
      optimize this operation will provide an unlocked_recvmsg operation.
      
      This takes into account comments made by:
      
      . Paul Moore: sock_recvmsg is called only for the first datagram,
        sock_recvmsg_nosec is used for the rest.
      
      . Caitlin Bestler: recvmmsg now has a struct timespec timeout, that
        works in the same fashion as the ppoll one.
      
        If the underlying protocol returns a datagram with MSG_OOB set, this
        will make recvmmsg return right away with as many datagrams (+ the OOB
        one) it has received so far.
      
      . Rémi Denis-Courmont & Steven Whitehouse: If we receive N < vlen
        datagrams and then recvmsg returns an error, recvmmsg will return
        the successfully received datagrams, store the error and return it
        in the next call.
      
      This paves the way for a subsequent optimization, sk_prot->unlocked_recvmsg,
      where we will be able to acquire the lock only at batch start and end, not at
      every underlying recvmsg call.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a2e27255
    • N
      net: Generalize socket rx gap / receive queue overflow cmsg · 3b885787
      Neil Horman 提交于
      Create a new socket level option to report number of queue overflows
      
      Recently I augmented the AF_PACKET protocol to report the number of frames lost
      on the socket receive queue between any two enqueued frames.  This value was
      exported via a SOL_PACKET level cmsg.  AFter I completed that work it was
      requested that this feature be generalized so that any datagram oriented socket
      could make use of this option.  As such I've created this patch, It creates a
      new SOL_SOCKET level option called SO_RXQ_OVFL, which when enabled exports a
      SOL_SOCKET level cmsg that reports the nubmer of times the sk_receive_queue
      overflowed between any two given frames.  It also augments the AF_PACKET
      protocol to take advantage of this new feature (as it previously did not touch
      sk->sk_drops, which this patch uses to record the overflow count).  Tested
      successfully by me.
      
      Notes:
      
      1) Unlike my previous patch, this patch simply records the sk_drops value, which
      is not a number of drops between packets, but rather a total number of drops.
      Deltas must be computed in user space.
      
      2) While this patch currently works with datagram oriented protocols, it will
      also be accepted by non-datagram oriented protocols. I'm not sure if thats
      agreeable to everyone, but my argument in favor of doing so is that, for those
      protocols which aren't applicable to this option, sk_drops will always be zero,
      and reporting no drops on a receive queue that isn't used for those
      non-participating protocols seems reasonable to me.  This also saves us having
      to code in a per-protocol opt in mechanism.
      
      3) This applies cleanly to net-next assuming that commit
      97775007 (my af packet cmsg patch) is reverted
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b885787
  15. 28 9月, 2009 1 次提交
  16. 26 9月, 2009 1 次提交
  17. 25 9月, 2009 2 次提交
  18. 24 9月, 2009 6 次提交