1. 25 4月, 2008 9 次提交
  2. 24 4月, 2008 12 次提交
  3. 23 4月, 2008 8 次提交
    • R
      [patch 6/7] vfs: mountinfo: add /proc/<pid>/mountinfo · 2d4d4864
      Ram Pai 提交于
      [mszeredi@suse.cz] rewrite and split big patch into managable chunks
      
      /proc/mounts in its current form lacks important information:
      
       - propagation state
       - root of mount for bind mounts
       - the st_dev value used within the filesystem
       - identifier for each mount and it's parent
      
      It also suffers from the following problems:
      
       - not easily extendable
       - ambiguity of mountpoints within a chrooted environment
       - doesn't distinguish between filesystem dependent and independent options
       - doesn't distinguish between per mount and per super block options
      
      This patch introduces /proc/<pid>/mountinfo which attempts to address
      all these deficiencies.
      
      Code shared between /proc/<pid>/mounts and /proc/<pid>/mountinfo is
      extracted into separate functions.
      
      Thanks to Al Viro for the help in getting the design right.
      Signed-off-by: NRam Pai <linuxram@us.ibm.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      2d4d4864
    • M
      [patch 5/7] vfs: mountinfo: allow using process root · a1a2c409
      Miklos Szeredi 提交于
      Allow /proc/<pid>/mountinfo to use the root of <pid> to calculate
      mountpoints.
      
       - move definition of 'struct proc_mounts' to <linux/mnt_namespace.h>
       - add the process's namespace and root to this structure
       - pass a pointer to 'struct proc_mounts' into seq_operations
      
      In addition the following cleanups are made:
      
       - use a common open function for /proc/<pid>/{mounts,mountstat}
       - surround namespace.c part of these proc files with #ifdef CONFIG_PROC_FS
       - make the seq_operations structures const
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      a1a2c409
    • M
      [patch 4/7] vfs: mountinfo: add mount peer group ID · 719f5d7f
      Miklos Szeredi 提交于
      Add a unique ID to each peer group using the IDR infrastructure.  The
      identifiers are reused after the peer group dissolves.
      
      The IDR structures are protected by holding namepspace_sem for write
      while allocating or deallocating IDs.
      
      IDs are allocated when a previously unshared vfsmount becomes the
      first member of a peer group.  When a new member is added to an
      existing group, the ID is copied from one of the old members.
      
      IDs are freed when the last member of a peer group is unshared.
      
      Setting the MNT_SHARED flag on members of a subtree is done as a
      separate step, after all the IDs have been allocated.  This way an
      allocation failure can be cleaned up easilty, without affecting the
      propagation state.
      
      Based on design sketch by Al Viro.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      719f5d7f
    • M
      [patch 3/7] vfs: mountinfo: add mount ID · 73cd49ec
      Miklos Szeredi 提交于
      Add a unique ID to each vfsmount using the IDR infrastructure.  The
      identifiers are reused after the vfsmount is freed.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      73cd49ec
    • M
      [patch 2/7] vfs: mountinfo: add seq_file_root() · 9d1bc601
      Miklos Szeredi 提交于
      Add a new function:
      
        seq_file_root()
      
      This is similar to seq_path(), but calculates the path relative to the
      given root, instead of current->fs->root.  If the path was unreachable
      from root, then modify the root parameter to reflect this.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      9d1bc601
    • R
      [patch 1/7] vfs: mountinfo: add dentry_path() · 6092d048
      Ram Pai 提交于
      [mszeredi@suse.cz] split big patch into managable chunks
      
      Add the following functions:
      
        dentry_path()
        seq_dentry()
      
      These are similar to d_path() and seq_path().  But instead of
      calculating the path within a mount namespace, they calculate the path
      from the root of the filesystem to a given dentry, ignoring mounts
      completely.
      Signed-off-by: NRam Pai <linuxram@us.ibm.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      6092d048
    • W
      i2c: Add platform driver on top of the new pca-algorithm · 244fbbb8
      Wolfram Sang 提交于
      Tested on a blackfin.
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      244fbbb8
    • W
      i2c-algo-pca: Extend for future drivers · c01b0831
      Wolfram Sang 提交于
      The separation between algorithm and adapter was unsharp at places. This was
      partly hidden by the fact, that the ISA-driver allowed just one instance and
      had all private data in static variables. This patch makes neccessary
      preparations to add a platform driver on top of the algorithm, while still
      supporting ISA. Note: Due to lack of hardware, the ISA-driver could not be
      tested except that it builds.
      
      Concerning the core struct i2c_algo_pca_data:
      
      - A private data field was added, all hardware dependant data may go here.
        Similar to other algorithms, now a pointer to this data is passed to the
        adapter's functions. In order to make as less changes as possible to the
        ISA-driver, it leaves the private data empty and still only uses its static
        variables.
      
      - A "reset_chip" function pointer was added; such a functionality must come
        from the adapter, not the algorithm.
      
      - use a variable "i2c_clock" instead of a function pointer "get_clock",
        allowing for write access to a default in case a wrong value was supplied.
      
      In the algorithm-file:
      
      - move "i2c-pca-algo.h" into "linux/i2c-algo-pca.h"
      - now using per_instance timeout values (i2c_adap->timeout)
      - error messages specify the device, not only the driver name
      - restructure initialization to easily support "i2c_add_numbered_adapter"
      - drop "retries" and "own" (i2c address) as they were unused
      
      (The state-machine for I2C-communication was not touched.)
      
      In the ISA-driver:
      
      - adapt to new algorithm
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      c01b0831
  4. 22 4月, 2008 11 次提交