From: Takao Indoh <indou.takao@soft.fujitsu.com>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: linux-kernel@vger.kernel.org, hch@infradead.org
Subject: Re: [PATCH 1/4]Diskdump Update
Date: Tue, 22 Jun 2004 19:57:00 +0900 [thread overview]
Message-ID: <E2C45847A4B0C6indou.takao@soft.fujitsu.com> (raw)
In-Reply-To: <20040621080129.GA27569@devserv.devel.redhat.com>
On Mon, 21 Jun 2004 10:01:29 +0200, Arjan van de Ven wrote:
>> On Fri, 11 Jun 2004 13:50:45 +0200, Arjan van de Ven wrote:
>>
>> >> +#ifdef CONFIG_PROC_FS
>> >> +static int proc_ioctl(struct inode *inode, struct file *file, unsigned
>> >> int cmd, unsigned long param)
>> >
>> >
>> >ehhh this looks evil
>>
>> Do you mean I should use not ioctl but the following style?
>>
>> echo "add /dev/hda1" > /proc/diskdump
>> echo "delete /dev/hda1" > /proc/diskdump
>
>well no since /dev/hda is pointless; major/minor pairs maybe.
>But why in /proc???? it sounds like a sysfs job to me, where you probably
>want to represent a dump relationship with a symlink, and use "rm" to remove
>an entry..
Plural devices(partitions) can be registered to the diskdump as dump
device, so it seems difficult to represent a dump relationship with a
symlink.
Possible idea is adding new attribute to somewhere of sysfs entry,
for example /sys/block/sda/sda1/dumpdev.
When new device is added, echo 1 to this entry.
# echo 1 > /sys/block/sda/sda1/dumpdev
Its store function is as follows.
static ssize_t store(struct kobject * kobj, struct attribute * attr,
const char * buf, size_t count)
{
ssize_t ret;
struct gendisk *disk =
container_of(p->kobj.parent, struct gendisk, kobj);
return dump_register_device(disk);
}
The problem is how to get scsi_device from gendisk.
It seems that the method using sysfs is more complex than current method
using proc...
It may be better to use simply module parameter like netdump.
Best Regards,
Takao Indoh
next prev parent reply other threads:[~2004-06-22 10:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-11 11:34 [PATCH 0/4]Diskdump Update Takao Indoh
2004-06-11 11:40 ` [PATCH 1/4]Diskdump Update Takao Indoh
2004-06-11 11:50 ` Arjan van de Ven
2004-06-11 13:40 ` Takao Indoh
2004-06-11 15:17 ` Martin J. Bligh
2004-06-14 1:38 ` Takao Indoh
2004-06-14 2:08 ` Martin J. Bligh
2004-06-21 7:59 ` Takao Indoh
2004-06-21 8:01 ` Arjan van de Ven
2004-06-22 10:57 ` Takao Indoh [this message]
2004-06-21 8:02 ` Christoph Hellwig
2004-06-11 11:41 ` [PATCH 2/4]Diskdump Update Takao Indoh
2004-06-17 12:49 ` Christoph Hellwig
2004-06-17 13:21 ` Takao Indoh
2004-06-17 13:39 ` Christoph Hellwig
2004-06-22 12:01 ` Takao Indoh
2004-06-22 12:12 ` Christoph Hellwig
2004-06-23 1:47 ` Takao Indoh
2004-06-11 11:42 ` [PATCH 3/4]Diskdump Update Takao Indoh
2004-06-11 11:43 ` [PATCH 4/4]Diskdump Update Takao Indoh
2004-06-14 14:20 ` [PATCH 0/4]Diskdump Update Takao Indoh
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=E2C45847A4B0C6indou.takao@soft.fujitsu.com \
--to=indou.takao@soft.fujitsu.com \
--cc=arjanv@redhat.com \
--cc=hch@infradead.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®