ext4: adjust reserved cluster count when removing extents
[linux-2.6-microblaze.git] / fs / ext4 / ext4_extents.h
index adf6668..98bd0e9 100644 (file)
@@ -119,6 +119,19 @@ struct ext4_ext_path {
        struct buffer_head              *p_bh;
 };
 
+/*
+ * Used to record a portion of a cluster found at the beginning or end
+ * of an extent while traversing the extent tree during space removal.
+ * A partial cluster may be removed if it does not contain blocks shared
+ * with extents that aren't being deleted (tofree state).  Otherwise,
+ * it cannot be removed (nofree state).
+ */
+struct partial_cluster {
+       ext4_fsblk_t pclu;  /* physical cluster number */
+       ext4_lblk_t lblk;   /* logical block number within logical cluster */
+       enum {initial, tofree, nofree} state;
+};
+
 /*
  * structure for external API
  */