All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: Andrew Morton <akpm@osdl.org>, Alasdair Kergon <agk@redhat.com>,
	Greg KH <gregkh@suse.de>, 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: [PATCH 0/7] dm/md dependency tree in sysfs (rev.4)
Date: Mon, 13 Mar 2006 17:03:55 -0500	[thread overview]
Message-ID: <4415EC4B.4010003@ce.jp.nec.com> (raw)

Hello,

This is an updated version of "dm/md dependency tree in sysfs" patch.
For example, if dm-0 maps to sda, we'll have following symlinks;
   /sys/block/dm-0/slaves/sda --> /sys/block/sda
   /sys/block/sda/holders/dm-0 --> /sys/block/dm-0

Difference from the previous version is a fix for a problem
of calling possibly-sleeping function inside the fast path.
There were 3 such calls in my previous bd_claim patch:
   - kmalloc(GFP_KERNEL)
   - sysfs_create_symlink()
   - sysfs_remove_symlink()
The allocation code is moved outside of locks.
Symlink operations needs to be atomic, so they are moved out
of global bdev_lock and use bdev->bd_sem instead.

Comments are welcome.

I tested this on 2.6.16-rc6 and 2.6.16-rc6-mm1 with both
CONFIG_PREEMPT and CONFIG_DEBUG_SPINLOCK_SLEEP enabled
and saw no warnings in kernel log.

Patches included are:

  1. [PATCH 1/7] kobject_add_dir
     Adding kobject_add_dir() function which creates
     a subdirectory for a given kobject.

  2. [PATCH 2/7] add holders/slaves subdirectory to /sys/block
     Creating "slaves" and "holders" directories in /sys/block/<disk>,
     creating "holders" directory under /sys/block/<disk>/<partition>

  3. [PATCH 3/7] bd_claim_by_kobject
     Adding bd_claim_by_kobject() function which takes kobject as
     additional signature of holder device and creates sysfs symlinks
     between holder device and claimed device.
     bd_release_from_kobject() is a counter part of bd_claim_by_kobject.

  4. [PATCH 4/7] bd_claim_by_disk
     Variants which take gendisk instead of kobject
     and do kobject_{get,put}(&gendisk->kobj).

  5. [PATCH 5/7] md to use bd_claim_by_disk
     Use bd_claim_by_disk.

  6. [PATCH 6/7] dm to use bd_claim_by_disk
     Use bd_claim_by_disk.

  7. [PATCH 7/7] conver bd_sem to bd_mutex
     bd_sem is converted to bd_mutex in 2.6.16-rc6-mm1.
     The patch follows that conversion.

Patch 3 includes the fix mentioned above.

Patch 6 depends on dm-table-store-md.patch and dm-tidy-mdptr.patch
which were committed to -mm yesterday.

Patch 7 depends on sem2mutex-blockdev-2.patch in 2.6.16-rc6-mm1.

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

             reply	other threads:[~2006-03-13 22:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13 22:03 Jun'ichi Nomura [this message]
2006-03-13 22:14 ` [PATCH 1/7] dm/md dependency tree in sysfs: kobject_add_dir Jun'ichi Nomura
2006-03-13 22:14   ` Jun'ichi Nomura
2006-03-14 19:40   ` patch kobject_add_dir.patch added to gregkh-2.6 tree gregkh
2006-03-13 22:14 ` [PATCH 2/7] dm/md dependency tree in sysfs: holders/slaves subdirectory Jun'ichi Nomura
2006-03-13 22:14   ` Jun'ichi Nomura
2006-03-14 17:21   ` Jun'ichi Nomura
2006-03-13 22:15 ` [PATCH 3/7] dm/md dependency tree in sysfs: bd_claim_by_kobject Jun'ichi Nomura
2006-03-13 22:15   ` Jun'ichi Nomura
2006-03-14  2:27   ` Andrew Morton
2006-03-14  2:27     ` Andrew Morton
2006-03-14 17:21     ` Jun'ichi Nomura
2006-03-13 22:16 ` [PATCH 4/7] dm/md dependency tree in sysfs: bd_claim_by_disk Jun'ichi Nomura
2006-03-13 22:16   ` Jun'ichi Nomura
2006-03-14  2:29   ` Andrew Morton
2006-03-14  2:29     ` Andrew Morton
2006-03-13 22:16 ` [PATCH 5/7] dm/md dependency tree in sysfs: md to use bd_claim_by_disk Jun'ichi Nomura
2006-03-13 22:17 ` [PATCH 6/7] dm/md dependency tree in sysfs: dm " Jun'ichi Nomura
2006-03-13 22:17   ` Jun'ichi Nomura
2006-03-13 22:17 ` [PATCH 7/7] dm/md dependency tree in sysfs: convert bd_sem to bd_mutex Jun'ichi Nomura

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=4415EC4B.4010003@ce.jp.nec.com \
    --to=j-nomura@ce.jp.nec.com \
    --cc=agk@redhat.com \
    --cc=akpm@osdl.org \
    --cc=dm-devel@redhat.com \
    --cc=gregkh@suse.de \
    --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.