From: Ned Bass Date: Fri, 22 Oct 2010 00:08:30 +0000 (-0700) Subject: Fix intermittent 'zpool add' failures X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=commitdiff_plain;h=d877ac6bfefaf09f0399888df1fc88bd4b4419d0;hp=d877ac6bfefaf09f0399888df1fc88bd4b4419d0;p=zfs.git Fix intermittent 'zpool add' failures Creating whole-disk vdevs can intermittently fail if a udev-managed symlink to the disk partition is already in place. To avoid this, we now remove any such symlink before partitioning the disk. This makes zpool_label_disk_wait() truly wait for the new link to show up instead of returning if it finds an old link still in place. Otherwise there is a window between when udev deletes and recreates the link during which access attempts will fail with ENOENT. Also, clean up a comment about waiting for udev to create symlinks. It no longer needs to describe the special cases for the link names, since that is now handled in a separate helper function. Signed-off-by: Brian Behlendorf ---