We always write these after a checkpoint, and there is little to be
gained by writing them earlier, and doing so causes their
dirty status to be lost, which is bad.
They should be treated much like PinPending blocks, but they
are not PinPending as they are written later in the checkpoint.
Signed-off-by: NeilBrown <neilb@suse.de>
static void finish_checkpoint(struct fs *fs, int youth)
{
+ set_bit(CheckpointFlushing, &fs->fsstate);
lafs_seg_flush_all(fs);
lafs_quota_flush(fs);
+ clear_bit(CheckpointFlushing, &fs->fsstate);
if (!test_bit(FinalCheckpoint, &fs->fsstate))
lafs_seg_apply_all(fs);
if (test_bit(B_Dirty, &b->b.flags)) {
if (test_bit(B_PinPending, &b->b.flags))
rv = AOP_WRITEPAGE_ACTIVATE;
+ else if (LAFSI(ino)->type == TypeSegmentMap &&
+ !test_bit(CheckpointFlushing, &fs->fsstate))
+ /* FIXME or quota ?? */
+ rv = AOP_WRITEPAGE_ACTIVATE;
else if (LAFSI(b->b.inode)->type == TypeInodeFile &&
b->my_inode &&
LAFSI(b->my_inode)->iblock)
#define FinalCheckpoint 3
#define CleanerDisabled 4
#define OrphansRunning 5
+#define CheckpointFlushing 6 /* We are writing the segusage blocks */
struct work_struct done_work; /* used for handling
* refile after write completes */