lkml.org 
[lkml]   [2008]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject[PATCH] [ConfigFS]: Allow symbolic links from a SysFS struct kobject source.
From
Date
Hi Joel, Greg and Co,

Here is the the first working code for allowing configfs to handle
symlinks from sysfs struct kobject based code. Here is the commit:
passing struct kobject into generic target_core_mod subsystem plugins
for locating struct block_device and struct scsi_device..

-------------------------------------------------------------------------

In struct configfs_item_operations, added allow_link_kobject() and
drop_link_kobject() to allow struct kobject to be passed through
the configfs API. The code for kobject symlink source sits along side
the exist configfs symlink code, and does not break existing apps that use
allow_link() or drop_link().

Also, there is two large FIXMEs with the first commit, in
fs/configfs/symlink.c:configfs_symlink() related to comparing
struct nameidata nd.path.dentry->d_sb == sysfs_sb.

The 2nd is when doing a 'ls -la' inside of the config group directory
containg the symlink source from sysfs, the source link does not currently
appear.. I will be following up these two items..

Signed-off-by: Nicholas A. Bellinger
---
fs/configfs/configfs_internal.h | 3 +-
fs/configfs/symlink.c | 168 +++++++++++++++++++++++++++------------
include/linux/configfs.h | 6 +-
3 files changed, 123 insertions(+), 54 deletions(-)

the following commit can be found at:

http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=commit;h=317aefe74354c0140dc8aebff1ef9467b6f0c9ba

Comments..? I will send along my patch to
drivers/lio-core/target_core_configfs.c in a moment to demonstrate how
to pull it all together with struct config_item_operations
allow_link_kobject() and drop_link_kobject()..
[unhandled content-type:application/mbox]
\
 
 \ /
  Last update: 2008-10-17 08:59    [W:0.073 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site