1. 11 7月, 2013 1 次提交
    • M
      dm: optimize use SRCU and RCU · 83d5e5b0
      Mikulas Patocka 提交于
      This patch removes "io_lock" and "map_lock" in struct mapped_device and
      "holders" in struct dm_table and replaces these mechanisms with
      sleepable-rcu.
      
      Previously, the code would call "dm_get_live_table" and "dm_table_put" to
      get and release table. Now, the code is changed to call "dm_get_live_table"
      and "dm_put_live_table". dm_get_live_table locks sleepable-rcu and
      dm_put_live_table unlocks it.
      
      dm_get_live_table_fast/dm_put_live_table_fast can be used instead of
      dm_get_live_table/dm_put_live_table. These *_fast functions use
      non-sleepable RCU, so the caller must not block between them.
      
      If the code changes active or inactive dm table, it must call
      dm_sync_table before destroying the old table.
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      83d5e5b0
  2. 10 7月, 2013 1 次提交
    • M
      fatfs: add FAT_IOCTL_GET_VOLUME_ID · 6e5b93ee
      Mike Lockwood 提交于
      This patch, originally from Android kernel, adds vfat ioctl command
      FAT_IOCTL_GET_VOLUME_ID, with this command we can get the vfat volume ID
      using following code:
      
      	ioctl(fd, FAT_IOCTL_GET_VOLUME_ID, &volume_ID)
      
      This patch is a modified version of the patch by Mike Lockwood, with
      changes from Dmitry Pervushin, who noticed the original patch makes some
      volume IDs abiguous with error returns: for example, if volume id is
      0xFFFFFDAD, that matches -ENOIOCTLCMD, we get "FFFFFFFF" from the user
      space.
      
      So add a parameter to ioctl to get the correct volume ID.
      
      Android uses vfat volume ID to identify different sd card, when a new sd
      card is inserted to device, android can scan the media on it and pop up
      new contents.
      Signed-off-by: NBintian Wang <bintian.wang@linaro.org>
      Cc: dmitry pervushin <dpervushin@gmail.com>
      Cc: Mike Lockwood <lockwood@android.com>
      Cc: Colin Cross <ccross@android.com>
      Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Sean McNeil <sean@mcneil.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6e5b93ee
  3. 09 7月, 2013 1 次提交
  4. 04 7月, 2013 1 次提交
    • A
      ptrace: add ability to get/set signal-blocked mask · 29000cae
      Andrey Vagin 提交于
      crtools uses a parasite code for dumping processes.  The parasite code is
      injected into a process with help PTRACE_SEIZE.
      
      Currently crtools blocks signals from a parasite code.  If a process has
      pending signals, crtools wait while a process handles these signals.
      
      This method is not suitable for stopped tasks.  A stopped task can have a
      few pending signals, when we will try to execute a parasite code, we will
      need to drop SIGSTOP, but all other signals must remain pending, because a
      state of processes must not be changed during checkpointing.
      
      This patch adds two ptrace commands to set/get signal-blocked mask.
      
      I think gdb can use this commands too.
      
      [akpm@linux-foundation.org: be consistent with brace layout]
      Signed-off-by: NAndrey Vagin <avagin@openvz.org>
      Reviewed-by: NOleg Nesterov <oleg@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      29000cae
  5. 02 7月, 2013 1 次提交
  6. 01 7月, 2013 2 次提交
  7. 29 6月, 2013 1 次提交
  8. 27 6月, 2013 2 次提交
  9. 26 6月, 2013 2 次提交
  10. 25 6月, 2013 1 次提交
  11. 21 6月, 2013 3 次提交
    • A
      vfio: hugepage support for vfio_iommu_type1 · 166fd7d9
      Alex Williamson 提交于
      We currently send all mappings to the iommu in PAGE_SIZE chunks,
      which prevents the iommu from enabling support for larger page sizes.
      We still need to pin pages, which means we step through them in
      PAGE_SIZE chunks, but we can batch up contiguous physical memory
      chunks to allow the iommu the opportunity to use larger pages.  The
      approach here is a bit different that the one currently used for
      legacy KVM device assignment.  Rather than looking at the vma page
      size and using that as the maximum size to pass to the iommu, we
      instead simply look at whether the next page is physically
      contiguous.  This means we might ask the iommu to map a 4MB region,
      while legacy KVM might limit itself to a maximum of 2MB.
      
      Splitting our mapping path also allows us to be smarter about locked
      memory because we can more easily unwind if the user attempts to
      exceed the limit.  Therefore, rather than assuming that a mapping
      will result in locked memory, we test each page as it is pinned to
      determine whether it locks RAM vs an mmap'd MMIO region.  This should
      result in better locking granularity and less locked page fudge
      factors in userspace.
      
      The unmap path uses the same algorithm as legacy KVM.  We don't want
      to track the pfn for each mapping ourselves, but we need the pfn in
      order to unpin pages.  We therefore ask the iommu for the iova to
      physical address translation, ask it to unpin a page, and see how many
      pages were actually unpinned.  iommus supporting large pages will
      often return something bigger than a page here, which we know will be
      physically contiguous and we can unpin a batch of pfns.  iommus not
      supporting large mappings won't see an improvement in batching here as
      they only unmap a page at a time.
      
      With this change, we also make a clarification to the API for mapping
      and unmapping DMA.  We can only guarantee unmaps at the same
      granularity as used for the original mapping.  In other words,
      unmapping a subregion of a previous mapping is not guaranteed and may
      result in a larger or smaller unmapping than requested.  The size
      field in the unmapping structure is updated to reflect this.
      Previously this was unmodified on mapping, always returning the the
      requested unmap size.  This is now updated to return the actual unmap
      size on success, allowing userspace to appropriately track mappings.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      166fd7d9
    • H
      [media] v4l2-core: remove support for obsolete VIDIOC_DBG_G_CHIP_IDENT · b71c9980
      Hans Verkuil 提交于
      This has been replaced by the new and much better VIDIOC_DBG_G_CHIP_INFO.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      b71c9980
    • E
      netfilter: xt_socket: add XT_SOCKET_NOWILDCARD flag · 681f130f
      Eric Dumazet 提交于
      xt_socket module can be a nice replacement to conntrack module
      in some cases (SYN filtering for example)
      
      But it lacks the ability to match the 3rd packet of TCP
      handshake (ACK coming from the client).
      
      Add a XT_SOCKET_NOWILDCARD flag to disable the wildcard mechanism.
      
      The wildcard is the legacy socket match behavior, that ignores
      LISTEN sockets bound to INADDR_ANY (or ipv6 equivalent)
      
      iptables -I INPUT -p tcp --syn -j SYN_CHAIN
      iptables -I INPUT -m socket --nowildcard -j ACCEPT
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Jesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      681f130f
  12. 20 6月, 2013 5 次提交
    • A
      powerpc/vfio: Implement IOMMU driver for VFIO · 5ffd229c
      Alexey Kardashevskiy 提交于
      VFIO implements platform independent stuff such as
      a PCI driver, BAR access (via read/write on a file descriptor
      or direct mapping when possible) and IRQ signaling.
      
      The platform dependent part includes IOMMU initialization
      and handling.  This implements an IOMMU driver for VFIO
      which does mapping/unmapping pages for the guest IO and
      provides information about DMA window (required by a POWER
      guest).
      
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5ffd229c
    • C
      tcp: introduce a per-route knob for quick ack · bcefe17c
      Cong Wang 提交于
      In previous discussions, I tried to find some reasonable heuristics
      for delayed ACK, however this seems not possible, according to Eric:
      
      	"ACKS might also be delayed because of bidirectional
      	traffic, and is more controlled by the application
      	response time. TCP stack can not easily estimate it."
      
      	"ACK can be incredibly useful to recover from losses in
      	a short time.
      
      	The vast majority of TCP sessions are small lived, and we
      	send one ACK per received segment anyway at beginning or
      	retransmits to let the sender smoothly increase its cwnd,
      	so an auto-tuning facility wont help them that much."
      
      and according to David:
      
      	"ACKs are the only information we have to detect loss.
      
      	And, for the same reasons that TCP VEGAS is fundamentally
      	broken, we cannot measure the pipe or some other
      	receiver-side-visible piece of information to determine
      	when it's "safe" to stretch ACK.
      
      	And even if it's "safe", we should not do it so that losses are
      	accurately detected and we don't spuriously retransmit.
      
      	The only way to know when the bandwidth increases is to
      	"test" it, by sending more and more packets until drops happen.
      	That's why all successful congestion control algorithms must
      	operate on explicited tested pieces of information.
      
      	Similarly, it's not really possible to universally know if
      	it's safe to stretch ACK or not."
      
      It still makes sense to enable or disable quick ack mode like
      what TCP_QUICK_ACK does.
      
      Similar to TCP_QUICK_ACK option, but for people who can't
      modify the source code and still wants to control
      TCP delayed ACK behavior. As David suggested, this should belong
      to per-path scope, since different pathes may want different
      behaviors.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Rick Jones <rick.jones2@hp.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Graf <tgraf@suug.ch>
      CC: David Laight <David.Laight@ACULAB.COM>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bcefe17c
    • S
      netlink: export netlink_diag.h header · 2bd470fc
      stephen hemminger 提交于
      The netlink_diag.h is in include/uapi/linux but not in the Kbuild necessary
      to cause it to be exported by make headers_install.
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2bd470fc
    • P
      openvswitch: Add gre tunnel support. · aa310701
      Pravin B Shelar 提交于
      Add gre vport implementation.  Most of gre protocol processing
      is pushed to gre module. It make use of gre demultiplexer
      therefore it can co-exist with linux device based gre tunnels.
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Acked-by: NJesse Gross <jesse@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aa310701
    • P
      openvswitch: Add tunneling interface. · 7d5437c7
      Pravin B Shelar 提交于
      Add ovs tunnel interface for set tunnel action for userspace.
      Signed-off-by: NPravin B Shelar <pshelar@nicira.com>
      Acked-by: NJesse Gross <jesse@nicira.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d5437c7
  13. 19 6月, 2013 1 次提交
  14. 18 6月, 2013 2 次提交
  15. 17 6月, 2013 1 次提交
  16. 15 6月, 2013 1 次提交
  17. 14 6月, 2013 7 次提交
    • A
      btrfs: device delete to get errors from the kernel · 183860f6
      Anand Jain 提交于
      when user runs command btrfs dev del the raid requisite error if any
      goes to the /var/log/messages, its not good idea to clutter messages
      with these user (knowledge) errors, further user don't have to review
      the system messages to know problem with the cli it should be dropped
      to the user as part of the cli return.
      
      to bring this feature created a set of the ERROR defined
      BTRFS_ERROR_DEV* error codes and created their error string.
      
      I expect this enum to be added with other error which we might
      want to communicate to the user land
      
      v3:
      moved the code with in the file no logical change
      
      v1->v2:
      introduce error codes for the device mgmt usage
      
      v1:
      adds a parameter in the ioctl arg struct to carry the error string
      Signed-off-by: NAnand Jain <anand.jain@oracle.com>
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      183860f6
    • J
      Btrfs: add ioctl to wait for qgroup rescan completion · 57254b6e
      Jan Schmidt 提交于
      btrfs_qgroup_wait_for_completion waits until the currently running qgroup
      operation completes. It returns immediately when no rescan process is in
      progress. This is useful to automate things around the rescan process (e.g.
      testing).
      Signed-off-by: NJan Schmidt <list.btrfs@jan-o-sch.net>
      Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
      57254b6e
    • S
      NFC: Send netlink events for secure elements additions and removals · 2757c372
      Samuel Ortiz 提交于
      When an NFC driver or host controller stack discovers a secure element,
      it will call nfc_add_se(). In order for userspace applications to use
      these secure elements, a netlink event will then be sent with the SE
      index and its type. With that information userspace applications can
      decide wether or not to enable SEs, through their indexes.
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      2757c372
    • S
      NFC: Add secure elements addition and removal API · fed7c25e
      Samuel Ortiz 提交于
      This API will allow NFC drivers to add and remove the secure elements
      they know about or detect. Typically this should be called (asynchronously
      or not) from the driver or the host interface stack detect_se hook.
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      fed7c25e
    • S
      NFC: pn533: Copy NFCID2 through ATR_REQ · 322bce95
      Samuel Ortiz 提交于
      When using NFC-F we should copy the NFCID2 buffer that we got from
      SENSF_RES through the ATR_REQ NFCID3 buffer. Not doing so violates
      NFC Forum digital requirement #189.
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      322bce95
    • R
      net/core: Add VF link state control · 1d8faf48
      Rony Efraim 提交于
      Add netlink directives and ndo entry to allow for controling
      VF link, which can be in one of three states:
      
      Auto - VF link state reflects the PF link state (default)
      
      Up - VF link state is up, traffic from VF to VF works even if
      the actual PF link is down
      
      Down - VF link state is down, no traffic from/to this VF, can be of
      use while configuring the VF
      Signed-off-by: NRony Efraim <ronye@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d8faf48
    • E
      NFC: Add firmware upload netlink command · 9674da87
      Eric Lapuyade 提交于
      As several NFC chipsets can have their firmwares upgraded and
      reflashed, this patchset adds a new netlink command to trigger
      that the driver loads or flashes a new firmware. This will allows
      userspace triggered firmware upgrade through netlink.
      The firmware name or hint is passed as a parameter, and the driver
      will eventually fetch the firmware binary through the request_firmware
      API.
      The cmd can only be executed when the nfc dev is not in use. Actual
      firmware loading/flashing is an asynchronous operation. Result of the
      operation shall send a new event up to user space through the nfc dev
      multicast socket. During operation, the nfc dev is not openable and
      thus not usable.
      Signed-off-by: NEric Lapuyade <eric.lapuyade@intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      9674da87
  18. 13 6月, 2013 1 次提交
  19. 12 6月, 2013 1 次提交
  20. 11 6月, 2013 5 次提交