Skip to content

nfs-utils: rework device scanning in blkmapd

Jim Rees linux-nfs 1 version Applied

Status from this message: Merged, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4blkmapd: get rid of config file and instead examine all block devicesutils/blkmapd/Makefile.am utils/blkmapd/cfg.c utils/blkmapd/cfg.h +1 more+26 -3740 replies
2/4blkmapd: don't rescan periodicallyutils/blkmapd/device-discovery.c utils/blkmapd/device-discovery.h+10 -60 replies
3/4blkmapd: don't use atomicio() where it's not neededutils/blkmapd/device-process.c+1 -10 replies
4/4blkmapd: don't try to distinguish between active/passive devicesutils/blkmapd/device-discovery.c utils/blkmapd/device-discovery.h utils/blkmapd/device-inq.c+23 -420 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] nfs-utils: rework device scanning in blkmapd

This series reworks the way device scanning is done in blkmapd as a result of test results and discussions at the Fall 2010 Bakeathon.

We get rid of the config file and instead examine all block devices as listed in /sys/block and /proc/partitions (this is the way fdisk does it). Since we're looking for pnfs signatures, it usually doesn't hurt to examine a device that isn't part of a layout, and in general it's hard to tell ahead of time which devices should be considered, so I think having a config file does more harm than good.

We get rid of periodic (once a minute) device rescanning, and instead rescan only when the kernel asks for a layout. This will suffice for the common case, and works with all current known server implementations. A later patch will re-introduce rescanning during the life of a layout, but will be triggered by configuration change notifications from udev, rather than by expiration of an arbitrary time interval.

We get rid of the test for active/passive devices. This test really only works for EMC servers, and isn't even needed because the passive devices will be skipped over during signature detection. Just remove the detection code.

Jim Rees (4):
blkmapd: get rid of config file and instead examine all block devices
blkmapd: don't rescan periodically
blkmapd: don't use atomicio() where it's not needed
blkmapd: don't try to distinguish between active/passive devices

 utils/blkmapd/Makefile.am        |    2 -
 utils/blkmapd/cfg.c              |  248 --------------------------------------
 utils/blkmapd/cfg.h              |   47 -------
 utils/blkmapd/device-discovery.c |  141 ++++++++--------------
 utils/blkmapd/device-discovery.h |    3 -
 utils/blkmapd/device-inq.c       |   40 ++-----
 utils/blkmapd/device-process.c   |    2 +-
 7 files changed, 60 insertions(+), 423 deletions(-)
 delete mode 100644 utils/blkmapd/cfg.c
 delete mode 100644 utils/blkmapd/cfg.h