1. 11 4月, 2014 1 次提交
    • K
      NVMe: Retry failed commands with non-fatal errors · edd10d33
      Keith Busch 提交于
      For commands returned with failed status, queue these for resubmission
      and continue retrying them until success or for a limited amount of
      time. The final timeout was arbitrarily chosen so requests can't be
      retried indefinitely.
      
      Since these are requeued on the nvmeq that submitted the command, the
      callbacks have to take an nvmeq instead of an nvme_dev as a parameter
      so that we can use the locked queue to append the iod to retry later.
      
      The nvme_iod conviently can be used to track how long we've been trying
      to successfully complete an iod request. The nvme_iod also provides the
      nvme prp dma mappings, so I had to move a few things around so we can
      keep those mappings.
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      [fixed checkpatch issue with long line]
      Signed-off-by: NMatthew Wilcox <matthew.r.wilcox@intel.com>
      edd10d33
  2. 08 4月, 2014 2 次提交
  3. 06 4月, 2014 1 次提交
  4. 04 4月, 2014 2 次提交
  5. 03 4月, 2014 1 次提交
  6. 02 4月, 2014 4 次提交
  7. 01 4月, 2014 4 次提交
    • M
      vfs: add cross-rename · da1ce067
      Miklos Szeredi 提交于
      If flags contain RENAME_EXCHANGE then exchange source and destination files.
      There's no restriction on the type of the files; e.g. a directory can be
      exchanged with a symlink.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NJ. Bruce Fields <bfields@redhat.com>
      da1ce067
    • M
      vfs: add RENAME_NOREPLACE flag · 0a7c3937
      Miklos Szeredi 提交于
      If this flag is specified and the target of the rename exists then the
      rename syscall fails with EEXIST.
      
      The VFS does the existence checking, so it is trivial to enable for most
      local filesystems.  This patch only enables it in ext4.
      
      For network filesystems the VFS check is not enough as there may be a race
      between a remote create and the rename, so these filesystems need to handle
      this flag in their ->rename() implementations to ensure atomicity.
      
      Andy writes about why this is useful:
      
      "The trivial answer: to eliminate the race condition from 'mv -i'.
      
      Another answer: there's a common pattern to atomically create a file
      with contents: open a temporary file, write to it, optionally fsync
      it, close it, then link(2) it to the final name, then unlink the
      temporary file.
      
      The reason to use link(2) is because it won't silently clobber the destination.
      
      This is annoying:
       - It requires an extra system call that shouldn't be necessary.
       - It doesn't work on (IMO sensible) filesystems that don't support
      hard links (e.g. vfat).
       - It's not atomic -- there's an intermediate state where both files exist.
       - It's ugly.
      
      The new rename flag will make this totally sensible.
      
      To be fair, on new enough kernels, you can also use O_TMPFILE and
      linkat to achieve the same thing even more cleanly."
      
      Suggested-by: Andy Lutomirski <luto@amacapital.net> 
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Reviewed-by: NJ. Bruce Fields <bfields@redhat.com>
      0a7c3937
    • D
      net-sysfs: expose number of carrier on/off changes · 2d3b479d
      david decotigny 提交于
      This allows to monitor carrier on/off transitions and detect link
      flapping issues:
       - new /sys/class/net/X/carrier_changes
       - new rtnetlink IFLA_CARRIER_CHANGES (getlink)
      
      Tested:
        - grep . /sys/class/net/*/carrier_changes
          + ip link set dev X down/up
          + plug/unplug cable
        - updated iproute2: prints IFLA_CARRIER_CHANGES
        - iproute2 20121211-2 (debian): unchanged behavior
      Signed-off-by: NDavid Decotigny <decot@googlers.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d3b479d
    • F
      net: export NET_ADDR_* values to user-space API · 339e0223
      Florian Fainelli 提交于
      NET_ADDR_* values are exported in the
      /sys/class/net/<iface>/addr_assign_type sysfs attributes, and as such
      constitutes an user-space ABI. Move the NET_ADDR_* definitions from
      include/linux/netdevice.h to include/uapi/linux/netdevice.h
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      339e0223
  8. 31 3月, 2014 4 次提交
    • R
      drm/msm: validate flags, etc · 93ddb0d3
      Rob Clark 提交于
      After reading a nice article on LWN[1], I went back and double checked
      my handling of invalid-input checking.  Turns out there were a couple
      places I had missed.
      
      Since the driver is fairly young, and the devices it supports are really
      only just barely usable for basic stuff (serial console) with an
      upstream kernel, I think we should fix this now and revert specific
      parts of this patch later in the unlikely event that a regression is
      reported.
      
      [1] https://lwn.net/Articles/588444/Signed-off-by: NRob Clark <robdclark@gmail.com>
      93ddb0d3
    • R
      drm/msm: add chip-id param · 4e1cbaa3
      Rob Clark 提交于
      Some of the w/a or different behavior of userspace blob driver seem to
      be keyed to gpu patch revision, rather than gpu-id.  So expose the full
      chip-id to userspace so it can DTRT.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4e1cbaa3
    • J
      locks: add new fcntl cmd values for handling file private locks · 5d50ffd7
      Jeff Layton 提交于
      Due to some unfortunate history, POSIX locks have very strange and
      unhelpful semantics. The thing that usually catches people by surprise
      is that they are dropped whenever the process closes any file descriptor
      associated with the inode.
      
      This is extremely problematic for people developing file servers that
      need to implement byte-range locks. Developers often need a "lock
      management" facility to ensure that file descriptors are not closed
      until all of the locks associated with the inode are finished.
      
      Additionally, "classic" POSIX locks are owned by the process. Locks
      taken between threads within the same process won't conflict with one
      another, which renders them useless for synchronization between threads.
      
      This patchset adds a new type of lock that attempts to address these
      issues. These locks conflict with classic POSIX read/write locks, but
      have semantics that are more like BSD locks with respect to inheritance
      and behavior on close.
      
      This is implemented primarily by changing how fl_owner field is set for
      these locks. Instead of having them owned by the files_struct of the
      process, they are instead owned by the filp on which they were acquired.
      Thus, they are inherited across fork() and are only released when the
      last reference to a filp is put.
      
      These new semantics prevent them from being merged with classic POSIX
      locks, even if they are acquired by the same process. These locks will
      also conflict with classic POSIX locks even if they are acquired by
      the same process or on the same file descriptor.
      
      The new locks are managed using a new set of cmd values to the fcntl()
      syscall. The initial implementation of this converts these values to
      "classic" cmd values at a fairly high level, and the details are not
      exposed to the underlying filesystem. We may eventually want to push
      this handing out to the lower filesystem code but for now I don't
      see any need for it.
      
      Also, note that with this implementation the new cmd values are only
      available via fcntl64() on 32-bit arches. There's little need to
      add support for legacy apps on a new interface like this.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      5d50ffd7
    • J
      locks: fix posix lock range overflow handling · ef12e72a
      J. Bruce Fields 提交于
      In the 32-bit case fcntl assigns the 64-bit f_pos and i_size to a 32-bit
      off_t.
      
      The existing range checks also seem to depend on signed arithmetic
      wrapping when it overflows.  In practice maybe that works, but we can be
      more careful.  That also allows us to make a more reliable distinction
      between -EINVAL and -EOVERFLOW.
      
      Note that in the 32-bit case SEEK_CUR or SEEK_END might allow the caller
      to set a lock with starting point no longer representable as a 32-bit
      value.  We could return -EOVERFLOW in such cases, but the locks code is
      capable of handling such ranges, so we choose to be lenient here.  The
      only problem is that subsequent GETLK calls on such a lock will fail
      with EOVERFLOW.
      
      While we're here, do some cleanup including consolidating code for the
      flock and flock64 cases.
      Signed-off-by: NJ. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      ef12e72a
  9. 29 3月, 2014 1 次提交
  10. 28 3月, 2014 1 次提交
  11. 25 3月, 2014 1 次提交
  12. 22 3月, 2014 1 次提交
  13. 21 3月, 2014 3 次提交
  14. 20 3月, 2014 3 次提交
    • A
      audit: Add generic compat syscall support · 4b588411
      AKASHI Takahiro 提交于
      lib/audit.c provides a generic function for auditing system calls.
      This patch extends it for compat syscall support on bi-architectures
      (32/64-bit) by adding lib/compat_audit.c.
      What is required to support this feature are:
       * add asm/unistd32.h for compat system call names
       * select CONFIG_AUDIT_ARCH_COMPAT_GENERIC
      Signed-off-by: NAKASHI Takahiro <takahiro.akashi@linaro.org>
      Acked-by: NRichard Guy Briggs <rgb@redhat.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      4b588411
    • W
      audit: Audit proc/<pid>/cmdline aka proctitle · 3f1c8250
      William Roberts 提交于
      During an audit event, cache and print the value of the process's
      proctitle value (proc/<pid>/cmdline). This is useful in situations
      where processes are started via fork'd virtual machines where the
      comm field is incorrect. Often times, setting the comm field still
      is insufficient as the comm width is not very wide and most
      virtual machine "package names" do not fit. Also, during execution,
      many threads have their comm field set as well. By tying it back to
      the global cmdline value for the process, audit records will be more
      complete in systems with these properties. An example of where this
      is useful and applicable is in the realm of Android. With Android,
      their is no fork/exec for VM instances. The bare, preloaded Dalvik
      VM listens for a fork and specialize request. When this request comes
      in, the VM forks, and the loads the specific application (specializing).
      This was done to take advantage of COW and to not require a load of
      basic packages by the VM on very app spawn. When this spawn occurs,
      the package name is set via setproctitle() and shows up in procfs.
      Many of these package names are longer then 16 bytes, the historical
      width of task->comm. Having the cmdline in the audit records will
      couple the application back to the record directly. Also, on my
      Debian development box, some audit records were more useful then
      what was printed under comm.
      
      The cached proctitle is tied to the life-cycle of the audit_context
      structure and is built on demand.
      
      Proctitle is controllable by userspace, and thus should not be trusted.
      It is meant as an aid to assist in debugging. The proctitle event is
      emitted during syscall audits, and can be filtered with auditctl.
      
      Example:
      type=AVC msg=audit(1391217013.924:386): avc:  denied  { getattr } for  pid=1971 comm="mkdir" name="/" dev="selinuxfs" ino=1 scontext=system_u:system_r:consolekit_t:s0-s0:c0.c255 tcontext=system_u:object_r:security_t:s0 tclass=filesystem
      type=SYSCALL msg=audit(1391217013.924:386): arch=c000003e syscall=137 success=yes exit=0 a0=7f019dfc8bd7 a1=7fffa6aed2c0 a2=fffffffffff4bd25 a3=7fffa6aed050 items=0 ppid=1967 pid=1971 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="mkdir" exe="/bin/mkdir" subj=system_u:system_r:consolekit_t:s0-s0:c0.c255 key=(null)
      type=UNKNOWN[1327] msg=audit(1391217013.924:386):  proctitle=6D6B646972002D70002F7661722F72756E2F636F6E736F6C65
      
      Acked-by: Steve Grubb <sgrubb@redhat.com> (wrt record formating)
      Signed-off-by: NWilliam Roberts <wroberts@tresys.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      3f1c8250
    • P
      isdn: capi: fix "CAPI_VERSION" comment · 2509671d
      Paul Bolle 提交于
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      2509671d
  15. 15 3月, 2014 1 次提交
  16. 13 3月, 2014 7 次提交
  17. 11 3月, 2014 2 次提交
  18. 08 3月, 2014 1 次提交