From: James H Date: Tue, 26 Jul 2011 10:47:20 +0000 (+0100) Subject: Call exportfs -v once for NFS shares. X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=commitdiff_plain;h=5333eb0b3b18d345052b8cfaf41b90a0c5781fb8;hp=5333eb0b3b18d345052b8cfaf41b90a0c5781fb8;p=zfs.git Call exportfs -v once for NFS shares. At the moment we call exportfs -v every time we check whether an NFS share is active. This happens every time you run a zfs or zpool command, making them extremely slow when you have a lot of exports. The time taken is approx O(n2) of the number of shares. This commit stores the output from exportfs -v in a temporary file and use this to speed up subsequent accesses. This mechanism is still too slow - if you have tens of thousands of NFS shares it will still be painful running ANY zfs/zpool command. Signed-off-by: Gunnar Beutner Signed-off-by: Brian Behlendorf Closes #341 ---