diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index c210926..0650985 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -1054,7 +1054,10 @@ ARDOUR_UI::update_disk_space()
 	char buf[64];
 	framecnt_t fr = _session->frame_rate();
 
-	if (frames == max_framecnt) {
+	if (frames == 0) {
+		/* Available space is unknown */
+		snprintf (buf, sizeof (buf), "%s", _("Disk: <span foreground=\"green\">?</span>"));
+	} else if (frames == max_framecnt) {
 		snprintf (buf, sizeof (buf), "%s", _("Disk: <span foreground=\"green\">24hrs+</span>"));
 	} else {
 		rec_enabled_streams = 0;
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index d31d1f9..3362d93 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -1328,7 +1328,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 	/* S/W RAID */
 
 	struct space_and_path {
-		uint32_t blocks; /* 4kB blocks */
+		uint32_t blocks; /* 4kB blocks, or 0 if unknown */
 		std::string path;
 
 		space_and_path() {
@@ -1346,6 +1346,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
 
 	std::vector<space_and_path> session_dirs;
 	std::vector<space_and_path>::iterator last_rr_session_dir;
+	/** If this is 0, we treat it as unknown */
 	uint32_t _total_free_4k_blocks;
 	Glib::Mutex space_lock;
 
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 559ca64..00a4d68 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3501,6 +3501,9 @@ Session::graph_reordered ()
 	}
 }
 
+/** @return Number of frames that there is disk space for, or 0
+ *  if the count is unknown.
+ */
 framecnt_t
 Session::available_capture_duration ()
 {
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index e729a7b..3b1e80f 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -2094,6 +2094,10 @@ Session::refresh_disk_space ()
 
 		scale = statfsbuf.f_bsize/4096.0;
 
+		/* f_bavail can be 0 if it is undefined for whatever
+		   filesystem we are looking at; Samba shares mounted
+		   via GVFS are an example of this.
+		*/
 		(*i).blocks = (uint32_t) floor (statfsbuf.f_bavail * scale);
 		_total_free_4k_blocks += (*i).blocks;
 	}
