rename option
This commit is contained in:
parent
7d2d600a11
commit
84d431a679
3 changed files with 13 additions and 13 deletions
|
@ -46,16 +46,16 @@ startIncrementalOption = Option.flag ['S'] "incremental" "start an incremental f
|
||||||
moreIncrementalOption :: Option
|
moreIncrementalOption :: Option
|
||||||
moreIncrementalOption = Option.flag ['m'] "more" "continue an incremental fsck"
|
moreIncrementalOption = Option.flag ['m'] "more" "continue an incremental fsck"
|
||||||
|
|
||||||
incrementalRestartOption :: Option
|
incrementalScheduleOption :: Option
|
||||||
incrementalRestartOption = Option.field [] "incremental-restart" paramTime
|
incrementalScheduleOption = Option.field [] "incremental-schedule" paramTime
|
||||||
"schedule an incremental fsck"
|
"schedule incremental fscking"
|
||||||
|
|
||||||
options :: [Option]
|
options :: [Option]
|
||||||
options =
|
options =
|
||||||
[ fromOption
|
[ fromOption
|
||||||
, startIncrementalOption
|
, startIncrementalOption
|
||||||
, moreIncrementalOption
|
, moreIncrementalOption
|
||||||
, incrementalRestartOption
|
, incrementalScheduleOption
|
||||||
]
|
]
|
||||||
|
|
||||||
seek :: [CommandSeek]
|
seek :: [CommandSeek]
|
||||||
|
@ -67,8 +67,8 @@ seek =
|
||||||
|
|
||||||
withIncremental :: (Incremental -> CommandSeek) -> CommandSeek
|
withIncremental :: (Incremental -> CommandSeek) -> CommandSeek
|
||||||
withIncremental = withValue $ do
|
withIncremental = withValue $ do
|
||||||
i <- maybe (return False) (checkrestart . parseDuration)
|
i <- maybe (return False) (checkschedule . parseDuration)
|
||||||
=<< Annex.getField (Option.name incrementalRestartOption)
|
=<< Annex.getField (Option.name incrementalScheduleOption)
|
||||||
starti <- Annex.getFlag (Option.name startIncrementalOption)
|
starti <- Annex.getFlag (Option.name startIncrementalOption)
|
||||||
morei <- Annex.getFlag (Option.name moreIncrementalOption)
|
morei <- Annex.getFlag (Option.name moreIncrementalOption)
|
||||||
case (i, starti, morei) of
|
case (i, starti, morei) of
|
||||||
|
@ -83,8 +83,8 @@ withIncremental = withValue $ do
|
||||||
recordStartTime
|
recordStartTime
|
||||||
return StartIncremental
|
return StartIncremental
|
||||||
|
|
||||||
checkrestart Nothing = error "bad --incremental-restart value"
|
checkschedule Nothing = error "bad --incremental-schedule value"
|
||||||
checkrestart (Just delta) = do
|
checkschedule (Just delta) = do
|
||||||
Annex.addCleanup "" $ do
|
Annex.addCleanup "" $ do
|
||||||
v <- getStartTime
|
v <- getStartTime
|
||||||
case v of
|
case v of
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -8,7 +8,7 @@ git-annex (3.20120925) UNRELEASED; urgency=low
|
||||||
Thanks, Justin Azoff
|
Thanks, Justin Azoff
|
||||||
* New --time-limit option, makes long git-annex commands stop after
|
* New --time-limit option, makes long git-annex commands stop after
|
||||||
a specified amount of time.
|
a specified amount of time.
|
||||||
* fsck: New --incremental-restart option which is nice for scheduling
|
* fsck: New --incremental-schedule option which is nice for scheduling
|
||||||
eg, monthly incremental fsck runs in cron jobs.
|
eg, monthly incremental fsck runs in cron jobs.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Mon, 24 Sep 2012 19:58:07 -0400
|
-- Joey Hess <joeyh@debian.org> Mon, 24 Sep 2012 19:58:07 -0400
|
||||||
|
|
|
@ -266,17 +266,17 @@ subdirectories).
|
||||||
the next time you fsck, you can specify --more to skip over
|
the next time you fsck, you can specify --more to skip over
|
||||||
files that have already been checked, and continue where it left off.
|
files that have already been checked, and continue where it left off.
|
||||||
|
|
||||||
The --incremental-restart option makes a new incremental fsck be
|
The --incremental-schedule option makes a new incremental fsck be
|
||||||
started a configurable time after the last incremental fsck was started.
|
started a configurable time after the last incremental fsck was started.
|
||||||
Note that the current incremental fsck has to completely finish
|
Once the current incremental fsck has completely finished, it causes
|
||||||
before the restart happens.
|
a new one to start.
|
||||||
|
|
||||||
Maybe you'd like to run a fsck for 5 hours at night, picking up each
|
Maybe you'd like to run a fsck for 5 hours at night, picking up each
|
||||||
night where it left off. You'd like this to continue until all files
|
night where it left off. You'd like this to continue until all files
|
||||||
have been fscked. And once it's done, you'd like a new fsck pass to start,
|
have been fscked. And once it's done, you'd like a new fsck pass to start,
|
||||||
but no more often than once a month. Then put this in a nightly cron job:
|
but no more often than once a month. Then put this in a nightly cron job:
|
||||||
|
|
||||||
git annex fsck --incremental-restart 30d --time-limit 5h
|
git annex fsck --incremental-schedule 30d --time-limit 5h
|
||||||
|
|
||||||
* unused
|
* unused
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue