All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: Alasdair G Kergon <agk@redhat.com>, Neil Brown <neilb@suse.de>
Cc: device-mapper development <dm-devel@redhat.com>,
	Lars Marowsky-Bree <lmb@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] sysfs representation of stacked devices (dm/md common)
Date: Tue, 21 Feb 2006 10:33:40 -0500	[thread overview]
Message-ID: <43FB32D4.3080101@ce.jp.nec.com> (raw)
In-Reply-To: <20060218195005.GT12169@agk.surrey.redhat.com>

Thanks Alasdair and Neil,

Alasdair G Kergon wrote:
> Test with trees of devices too - where a whole tree is suspended -

Suspending maps in the tree and reload one of them?
I'll try that.

> I don't think you can allocate anywhere in dm_swap_table()
> without PF_MEMALLOC (which I recently removed and am reluctant
> to reinstate).

I understand your reluctance and I don't want to revive it either.
I think moving sysfs_add_link() outside of dm_swap_table() solves
this. Am I right?
Or do you want to eliminate the possibility that sysfs_remove_symlink()
may require memory allocation in future?

Anyway, I'll seek for bd_claim based approach.

> Have you considered if anything is feasible based around bd_claim()?
> Doesn't it make more sense for the links to be set up at table
> load time - i.e. superset of both tables if present?

I think it makes sense. But I have difficulty with it.

What I once thought was extending bd_claim() like:
   bd_claim_with_owner(bdev, void *holder, struct kobject *owner)
where "owner" is a kobject for "slaves" directory.
We may have the object embedded in gendisk structure.
Then we can create symlinks like:
   /sys/block/<bdev>/holders/<owner> --> /sys/block/<owner>
   /sys/block/<owner>/slaves/<bdev> --> /sys/block/<bdev>

This should work for md.

However, dm needs more for its flexibility.
Because multiple dm devices can hold one device and one dm device
can hold a device twice (i.e. current table and new table),
we need to reference-count per relationship basis, not per slave
device.
This might be solved by allocating management struct in bd_claim()
to reference-counting the relationship.
I'll try this. Comments are welcome.

-- 
Jun'ichi Nomura, NEC Solutions (America), Inc.

WARNING: multiple messages have this Message-ID (diff)
From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: Alasdair G Kergon <agk@redhat.com>, Neil Brown <neilb@suse.de>
Cc: Lars Marowsky-Bree <lmb@suse.de>,
	device-mapper development <dm-devel@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] sysfs representation of stacked devices (dm/md common)
Date: Tue, 21 Feb 2006 10:33:40 -0500	[thread overview]
Message-ID: <43FB32D4.3080101@ce.jp.nec.com> (raw)
In-Reply-To: <20060218195005.GT12169@agk.surrey.redhat.com>

Thanks Alasdair and Neil,

Alasdair G Kergon wrote:
> Test with trees of devices too - where a whole tree is suspended -

Suspending maps in the tree and reload one of them?
I'll try that.

> I don't think you can allocate anywhere in dm_swap_table()
> without PF_MEMALLOC (which I recently removed and am reluctant
> to reinstate).

I understand your reluctance and I don't want to revive it either.
I think moving sysfs_add_link() outside of dm_swap_table() solves
this. Am I right?
Or do you want to eliminate the possibility that sysfs_remove_symlink()
may require memory allocation in future?

Anyway, I'll seek for bd_claim based approach.

> Have you considered if anything is feasible based around bd_claim()?
> Doesn't it make more sense for the links to be set up at table
> load time - i.e. superset of both tables if present?

I think it makes sense. But I have difficulty with it.

What I once thought was extending bd_claim() like:
   bd_claim_with_owner(bdev, void *holder, struct kobject *owner)
where "owner" is a kobject for "slaves" directory.
We may have the object embedded in gendisk structure.
Then we can create symlinks like:
   /sys/block/<bdev>/holders/<owner> --> /sys/block/<owner>
   /sys/block/<owner>/slaves/<bdev> --> /sys/block/<bdev>

This should work for md.

However, dm needs more for its flexibility.
Because multiple dm devices can hold one device and one dm device
can hold a device twice (i.e. current table and new table),
we need to reference-count per relationship basis, not per slave
device.
This might be solved by allocating management struct in bd_claim()
to reference-counting the relationship.
I'll try this. Comments are welcome.

-- 
Jun'ichi Nomura, NEC Solutions (America), Inc.

  reply	other threads:[~2006-02-21 15:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17 18:00 [PATCH 0/3] sysfs representation of stacked devices (dm/md) Jun'ichi Nomura
2006-02-17 18:01 ` [PATCH 1/3] sysfs representation of stacked devices (dm/md common) Jun'ichi Nomura
2006-02-17 18:01   ` Jun'ichi Nomura
2006-02-17 18:44   ` Alasdair G Kergon
2006-02-17 18:44     ` Alasdair G Kergon
2006-02-18  1:03     ` Jun'ichi Nomura
2006-02-18  1:03       ` Jun'ichi Nomura
2006-02-18 19:50       ` Alasdair G Kergon
2006-02-18 19:50         ` Alasdair G Kergon
2006-02-21 15:33         ` Jun'ichi Nomura [this message]
2006-02-21 15:33           ` Jun'ichi Nomura
2006-02-21 15:52           ` Alasdair G Kergon
2006-02-21 15:52             ` Alasdair G Kergon
2006-02-17 18:03 ` [PATCH 2/3] sysfs representation of stacked devices (dm) Jun'ichi Nomura
2006-02-17 18:03   ` Jun'ichi Nomura
2006-02-17 18:05 ` [PATCH 3/3] sysfs representation of stacked devices (md) Jun'ichi Nomura
2006-02-17 18:05   ` Jun'ichi Nomura
2006-02-17 19:42 ` [PATCH 0/3] sysfs representation of stacked devices (dm/md) Alasdair G Kergon
2006-02-17 19:42   ` Alasdair G Kergon
2006-02-18  1:21   ` Jun'ichi Nomura
2006-02-18  1:21     ` Jun'ichi Nomura
2006-02-18 19:53     ` Alasdair G Kergon
2006-02-18 19:53       ` Alasdair G Kergon
2006-02-21 15:34       ` Jun'ichi Nomura
2006-02-21 15:34         ` Jun'ichi Nomura
2006-02-18  6:06   ` Kyle Moffett
2006-02-19 22:04 ` Neil Brown
2006-02-19 22:04   ` Neil Brown

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=43FB32D4.3080101@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lmb@suse.de \
    --cc=neilb@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.