summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/softdep.h
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2001-05-08 07:42:20 +0000
committermckusick <mckusick@FreeBSD.org>2001-05-08 07:42:20 +0000
commitd8ef9cc3b5b9f5e2ab6ca2d6250d97259e791511 (patch)
treec2964ee297000fc02e38d8e3da2d627ff4ec7f81 /sys/ufs/ffs/softdep.h
parent1be6156a3d0e1361a8aded14931c71b619cd3968 (diff)
downloadFreeBSD-src-d8ef9cc3b5b9f5e2ab6ca2d6250d97259e791511.zip
FreeBSD-src-d8ef9cc3b5b9f5e2ab6ca2d6250d97259e791511.tar.gz
When running with soft updates, track the number of blocks and files
that are committed to being freed and reflect these blocks in the counts returned by statfs (and thus also by the `df' command). This change allows programs such as those that do news expiration to know when to stop if they are trying to create a certain percentage of free space. Note that this change does not solve the much harder problem of making this to-be-freed space available to applications that want it (thus on a nearly full filesystem, you may still encounter out-of-space conditions even though the free space will show up eventually). Hopefully this harder problem will be the subject of a future enhancement.
Diffstat (limited to 'sys/ufs/ffs/softdep.h')
-rw-r--r--sys/ufs/ffs/softdep.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/ufs/ffs/softdep.h b/sys/ufs/ffs/softdep.h
index cf9cac8..9a158c5 100644
--- a/sys/ufs/ffs/softdep.h
+++ b/sys/ufs/ffs/softdep.h
@@ -82,8 +82,10 @@
* data structure is frozen from further change until its dependencies
* have been completed and its resources freed after which it will be
* discarded. The IOSTARTED flag prevents multiple calls to the I/O
- * start routine from doing multiple rollbacks. The ONWORKLIST flag
- * shows whether the structure is currently linked onto a worklist.
+ * start routine from doing multiple rollbacks. The SPACECOUNTED flag
+ * says that the files space has been accounted to the pending free
+ * space count. The ONWORKLIST flag shows whether the structure is
+ * currently linked onto a worklist.
*/
#define ATTACHED 0x0001
#define UNDONE 0x0002
@@ -95,6 +97,7 @@
#define DIRCHG 0x0080
#define GOINGAWAY 0x0100
#define IOSTARTED 0x0200
+#define SPACECOUNTED 0x0400
#define ONWORKLIST 0x8000
#define ALLCOMPLETE (ATTACHED | COMPLETE | DEPCOMPLETE)
OpenPOWER on IntegriCloud