Re: [PATCH] scsi_transport_spi: convert to attribute groups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2008-01-11 at 21:11 -0800, Greg KH wrote:
> On Sat, Jan 05, 2008 at 10:18:27AM -0600, James Bottomley wrote:
> > This conversion makes full use of the is_visible() callback on attribute
> > groups.  Now, each device appears only with its capability flags in the
> > transport class directory.  Previously each device appeared with the
> > capability of the host, so this is a functionality improvement.
> > Converting to attribute groups allows us to sweep away most of the home
> > grown #defines that were effectively doing the same thing.
> > 
> > James
> > 
> > ---
> > 
> > This depends on:
> > 
> > [PATCH] sysfs: add filter function to groups
> > [PATCH] fix the sysfs_add_file_to_group interfaces
> > [PATCH] attribute_container: update to use the group interface
> > [PATCH] add missing transport configure points for target and host
> > 
> > Greg and Kay, there's a nasty point in the code where I'd like to use
> > the -EEXIST return of sysfs_add_file_to_group() to indicate the file is
> > already there, however, this also dumps a stack trace and would frighten
> > users ... can we get rid of the printk and the WARN_ON(1)?
> 
> I really don't want to, as it has caught a lot of problems in the past.
> 
> What do you want to do that needs this error to happen "properly"?

The reason I'm interested is because the existence of the file is
storing information for me in the sysfs tree.  (Or rather allowing me to
forget information).  Perhaps just an API to check for the existence of
the file for an attribute would be enough?

something like sysfs_check_file_in_group(struct kobject *kobj,
		const struct attribute *attr, const char *group)

?

James

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux