From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Greg KH <greg@kroah.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: [PATCH] scsi_transport_spi: convert to attribute groups
Date: Sat, 12 Jan 2008 09:34:17 -0600 [thread overview]
Message-ID: <1200152057.3656.9.camel@localhost.localdomain> (raw)
In-Reply-To: <20080112051122.GB19894@kroah.com>
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
prev parent reply other threads:[~2008-01-12 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-05 16:18 [PATCH] scsi_transport_spi: convert to attribute groups James Bottomley
2008-01-12 5:11 ` Greg KH
2008-01-12 15:34 ` James Bottomley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1200152057.3656.9.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox