1. 13 10月, 2012 1 次提交
  2. 03 2月, 2012 1 次提交
  3. 26 8月, 2011 1 次提交
  4. 27 7月, 2011 1 次提交
  5. 08 6月, 2011 1 次提交
  6. 31 3月, 2011 1 次提交
    • P
      connector: convert to synchronous netlink message processing · 04f482fa
      Patrick McHardy 提交于
      Commits 01a16b21 (netlink: kill eff_cap from struct netlink_skb_parms)
      and c53fa1ed (netlink: kill loginuid/sessionid/sid members from struct
      netlink_skb_parms) removed some members from struct netlink_skb_parms
      that depend on the current context, all netlink users are now required
      to do synchronous message processing.
      
      connector however queues received messages and processes them in a work
      queue, which is not valid anymore. This patch converts connector to do
      synchronous message processing by invoking the registered callback handler
      directly from the netlink receive function.
      
      In order to avoid invoking the callback with connector locks held, a
      reference count is added to struct cn_callback_entry, the reference
      is taken when finding a matching callback entry on the device's queue_list
      and released after the callback handler has been invoked.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      04f482fa
  7. 24 2月, 2011 1 次提交
  8. 21 1月, 2011 1 次提交
  9. 25 10月, 2010 1 次提交
    • T
      connector: remove lazy workqueue creation · 6cebb17b
      Tejun Heo 提交于
      Commit 1a5645bc (connector: create connector workqueue only while
      needed once) implements lazy workqueue creation for connector
      workqueue.  With cmwq now in place, lazy workqueue creation doesn't
      make much sense while adding a lot of complexity.  Remove it and
      allocate an ordered workqueue during initialization.
      
      This also removes a call to flush_scheduled_work() which is deprecated
      and scheduled to be removed.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6cebb17b
  10. 03 2月, 2010 1 次提交
    • E
      connector: Delete buggy notification code. · f98bfbd7
      Evgeniy Polyakov 提交于
      On Tue, Feb 02, 2010 at 02:57:14PM -0800, Greg KH (gregkh@suse.de) wrote:
      > > There are at least two ways to fix it: using a big cannon and a small
      > > one. The former way is to disable notification registration, since it is
      > > not used by anyone at all. Second way is to check whether calling
      > > process is root and its destination group is -1 (kind of priveledged
      > > one) before command is dispatched to workqueue.
      > 
      > Well if no one is using it, removing it makes the most sense, right?
      > 
      > No objection from me, care to make up a patch either way for this?
      
      Getting it is not used, let's drop support for notifications about
      (un)registered events from connector.
      Another option was to check credentials on receiving, but we can always
      restore it without bugs if needed, but genetlink has a wider code base
      and none complained, that userspace can not get notification when some
      other clients were (un)registered.
      
      Kudos for Sebastian Krahmer <krahmer@suse.de>, who found a bug in the
      code.
      Signed-off-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f98bfbd7
  11. 26 11月, 2009 1 次提交
  12. 03 10月, 2009 3 次提交
  13. 18 7月, 2009 1 次提交
    • M
      connector: make callback argument type explicit · 0741241c
      Mike Frysinger 提交于
      The connector documentation states that the argument to the callback
      function is always a pointer to a struct cn_msg, but rather than encode it
      in the API itself, it uses a void pointer everywhere.  This doesn't make
      much sense to encode the pointer in documentation as it prevents proper C
      type checking from occurring and can easily allow people to use the wrong
      pointer type.  So convert the argument type to an explicit struct cn_msg
      pointer.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0741241c
  14. 22 6月, 2009 1 次提交
    • J
      dm raid1: add userspace log · f5db4af4
      Jonthan Brassow 提交于
      This patch contains a device-mapper mirror log module that forwards
      requests to userspace for processing.
      
      The structures used for communication between kernel and userspace are
      located in include/linux/dm-log-userspace.h.  Due to the frequency,
      diversity, and 2-way communication nature of the exchanges between
      kernel and userspace, 'connector' was chosen as the interface for
      communication.
      
      The first log implementations written in userspace - "clustered-disk"
      and "clustered-core" - support clustered shared storage.   A userspace
      daemon (in the LVM2 source code repository) uses openAIS/corosync to
      process requests in an ordered fashion with the rest of the nodes in the
      cluster so as to prevent log state corruption.  Other implementations
      with no association to LVM or openAIS/corosync, are certainly possible.
      
      (Imagine if two machines are writing to the same region of a mirror.
      They would both mark the region dirty, but you need a cluster-aware
      entity that can handle properly marking the region clean when they are
      done.  Otherwise, you might clear the region when the first machine is
      done, not the second.)
      Signed-off-by: NJonathan Brassow <jbrassow@redhat.com>
      Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      f5db4af4
  15. 04 4月, 2009 1 次提交
    • E
      Staging: dst: core files. · ce0d9d72
      Evgeniy Polyakov 提交于
      This patch contains DST core files, which introduce
      block layer, connector and sysfs registration glue and main headers.
      
      Connector is used for the configuration of the node (its type, address,
      device name and so on). Sysfs provides bits of information about running
      devices in the following format:
      
      +/*
      + * DST sysfs tree for device called 'storage':
      + *
      + * /sys/bus/dst/devices/storage/
      + * /sys/bus/dst/devices/storage/type : 192.168.4.80:1025
      + * /sys/bus/dst/devices/storage/size : 800
      + * /sys/bus/dst/devices/storage/name : storage
      + */
      
      DST header contains structure definitions and protocol command description.
      Signed-off-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ce0d9d72
  16. 03 2月, 2009 1 次提交
    • F
      connector: create connector workqueue only while needed once · 1a5645bc
      Frederic Weisbecker 提交于
      The netlink connector uses its own workqueue to relay the datas sent
      from userspace to the appropriate callback.  If you launch the test
      from Documentation/connector and change it a bit to send a high flow
      of data, you will see thousands of events coming to the "cqueue"
      workqueue by looking at the workqueue tracer.
      
      This flow of events can be sent very quickly. So, to not encumber the
      kevent workqueue and delay other jobs, the "cqueue" workqueue should
      remain.
      
      But this workqueue is pointless most of the time, it will always be
      created (assuming you have built it of course) although only
      developpers with specific needs will use it.
      
      So avoid this "most of the time useless task", this patch proposes to
      create this workqueue only when needed once.  The first jobs to be
      sent to connector callbacks will be sent to kevent while the "cqueue"
      thread creation will be scheduled to kevent too.
      
      The following jobs will continue to be scheduled to keventd until the
      cqueue workqueue is created, and then the rest of the jobs will
      continue to perform as usual, through this dedicated workqueue.
      
      Each time I tested this patch, only the first event was sent to
      keventd, the rest has been sent to cqueue which have been created
      quickly.
      
      Also, this patch fixes some trailing whitespaces on the connector files.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NEvgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a5645bc
  17. 16 1月, 2009 1 次提交
  18. 31 7月, 2008 1 次提交
  19. 27 2月, 2008 1 次提交
  20. 29 1月, 2008 2 次提交
  21. 17 10月, 2007 2 次提交
  22. 11 10月, 2007 1 次提交
    • D
      [NET]: make netlink user -> kernel interface synchronious · cd40b7d3
      Denis V. Lunev 提交于
      This patch make processing netlink user -> kernel messages synchronious.
      This change was inspired by the talk with Alexey Kuznetsov about current
      netlink messages processing. He says that he was badly wrong when introduced 
      asynchronious user -> kernel communication.
      
      The call netlink_unicast is the only path to send message to the kernel
      netlink socket. But, unfortunately, it is also used to send data to the
      user.
      
      Before this change the user message has been attached to the socket queue
      and sk->sk_data_ready was called. The process has been blocked until all
      pending messages were processed. The bad thing is that this processing
      may occur in the arbitrary process context.
      
      This patch changes nlk->data_ready callback to get 1 skb and force packet
      processing right in the netlink_unicast.
      
      Kernel -> user path in netlink_unicast remains untouched.
      
      EINTR processing for in netlink_run_queue was changed. It forces rtnl_lock
      drop, but the process remains in the cycle until the message will be fully
      processed. So, there is no need to use this kludges now.
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Acked-by: NAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd40b7d3
  23. 18 12月, 2006 1 次提交
  24. 22 11月, 2006 1 次提交
  25. 23 6月, 2006 1 次提交
  26. 11 11月, 2005 1 次提交
  27. 07 11月, 2005 1 次提交
  28. 09 10月, 2005 1 次提交
  29. 05 10月, 2005 1 次提交
  30. 27 9月, 2005 1 次提交
  31. 12 9月, 2005 1 次提交
    • E
      [NET]: Add netlink connector. · 7672d0b5
      Evgeniy Polyakov 提交于
      Kernel connector - new userspace <-> kernel space easy to use
      communication module which implements easy to use bidirectional
      message bus using netlink as it's backend.  Connector was created to
      eliminate complex skb handling both in send and receive message bus
      direction.
      
      Connector driver adds possibility to connect various agents using as
      one of it's backends netlink based network.  One must register
      callback and identifier. When driver receives special netlink message
      with appropriate identifier, appropriate callback will be called.
      
      From the userspace point of view it's quite straightforward:
      
      	socket();
      	bind();
      	send();
      	recv();
      
      But if kernelspace want to use full power of such connections, driver
      writer must create special sockets, must know about struct sk_buff
      handling...  Connector allows any kernelspace agents to use netlink
      based networking for inter-process communication in a significantly
      easier way:
      
      int cn_add_callback(struct cb_id *id, char *name, void (*callback) (void *));
      void cn_netlink_send(struct cn_msg *msg, u32 __groups, int gfp_mask);
      
      struct cb_id
      {
      	__u32			idx;
      	__u32			val;
      };
      
      idx and val are unique identifiers which must be registered in
      connector.h for in-kernel usage.  void (*callback) (void *) - is a
      callback function which will be called when message with above idx.val
      will be received by connector core.
      
      Using connector completely hides low-level transport layer from it's
      users.
      
      Connector uses new netlink ability to have many groups in one socket.
      
      [ Incorporating many cleanups and fixes by myself and
        Andrew Morton -DaveM ]
      Signed-off-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7672d0b5