summaryrefslogtreecommitdiffstats
path: root/utils/blkmapd
Commit message (Collapse)AuthorAgeFilesLines
* blkmapd: unlink pid file when error outKinglong Mee2016-07-201-4/+4
| | | | | | | Fix some error out without unlink pid file. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: Let running correctly when pid file existsKinglong Mee2016-07-201-7/+1
| | | | | | | | Blkmapd cannot run until blkmapd.pid is unlinked. This patch lets checking exists based on lockf without stat. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: Add the -h flag on the man pageYongcheng Yang2016-05-141-1/+4
| | | | | | | Update SYNOPSIS and OPTIONS for the -h flag. Signed-off-by: Yongcheng Yang <yongcheng.yang@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* fix building w/newer C librariesMike Frysinger2016-04-271-0/+1
| | | | | | | | | | | | | | Linux C libraries are moving away from implicitly including the header sys/sysmacros.h via sys/types.h. We would like to do this for glibc now, but others (musl/etc...) have been doing it already. This means any code using major/minor/makedevs functions will fail to build when they don't include that header. Leverage the AC_HEADER_MAJOR macro that configure is already using to pull in the right header. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: Added a usage routineSteve Dickson2016-01-201-2/+12
| | | | | | | Show the correct arguments when invalid arguments are used. Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: Skip the SCSI ID if data length is zeroKinglong Mee2015-07-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | In vmware linux, the iscsi device contains more than one SCSI ID, and the second one's data length is zero. If there are two iSCSI devices with the second SCSI ID's data length is zero, the first iSCSI device will record with an invalid SCSI ID as zero length, the second one will be treat as the first one for the SCSI ID is zero length too. It means the only the first iSCSI device is exist in blkmapd's cache, the request for the second iSCSI device will failed as, "blkmapd: Could not find disk for device" and, "bl_resolve_deviceid failed to decode device: 2". v2, update comments v3, add a comment in the code v4, update comment as Christoph's suggestion Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: Fix infinite loop when reading serialKinglong Mee2015-06-301-1/+2
| | | | | | | | | | If (dev_id->ids & 0xf) < current_id, must updates pos when continue. Otherwise an infinite loop. No other places use the pos value, just move to the top of while. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: Make sure device root contains valid device idKinglong Mee2015-03-261-3/+7
| | | | | | | | | When testing pnfs in virtual linux based on VirtualBox, blkmapd gets dev_root->len == 0, which causes it Segmentation fault. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: dump useful device information to syslogChristoph Hellwig2014-08-133-1/+11
| | | | | | | | Dump some information about used devices to syslog so that an admin can troubleshoot failing blocklayout mounts. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: fix broken multipath handlingChristoph Hellwig2014-08-131-23/+4
| | | | | | | | | | | | | | | | | We do want to use the dm-multipath device if it exists, which the code is generally prepared for, except that this check excludes them early. In addition this will also add the passive path to the device list, which is harmless if an active one exists as that or the multipath device will be preferred, and at least allows us to work if it doesn't. Also fix up the check if an path needs to be updated to remove the silly partition check - pNFS block offset are relative to the device so partion should never match it instead of the full device. On the other hand the simplistic check easily creates false positives, e.g. dm-10 is considered a partition of dm-1. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: proper signal handlingPeng Tao2012-08-231-1/+17
| | | | | Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: allow blocklayoutdriver module to load/unloadPeng Tao2012-08-231-20/+84
| | | | | | | | User may load/unload blocklayoutdriver module dynanmically. So we handle it by watching the pipe file creation/deletion. Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: remove pretty_sig()Jim Rees2012-05-151-29/+0
| | | | | | | | | | | | This really only works against EMC servers. There is at least one server that returns unprintable signatures, which fill the log with garbage (the spec does not mandate printable signatures). It could be made more generic, for example by checking each byte for isprint(). But the signatures are really only of interest to developers, not admins, so it seems better to just remove it. Signed-off-by: Jim Rees <rees@umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: Use getconf(_SC_PAGE_SIZE)Luk Claes2011-10-031-1/+1
| | | | | | | | | PAGE_SIZE is not exported by all architectures as it is not fixed: it can depend on the model of the machine. So it's better to query the system configuration for the actual page size on the machine. Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: Add complex block layout discovery and mapping daemonSteve Dickson2011-09-227-0/+1846
This daemon is required to handle upcalls from the kernel pnfs block layout driver. Signed-off-by: Jim Rees <rees@umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>