parallel fsck (yes, these changes are all it takes now!)
This commit is contained in:
parent
c0c595345c
commit
3d0f41518d
3 changed files with 9 additions and 3 deletions
|
@ -44,7 +44,7 @@ import Data.Time.Clock.POSIX
|
||||||
import System.Posix.Types (EpochTime)
|
import System.Posix.Types (EpochTime)
|
||||||
|
|
||||||
cmd :: Command
|
cmd :: Command
|
||||||
cmd = withGlobalOptions annexedMatchingOptions $
|
cmd = withGlobalOptions (jobsOption : annexedMatchingOptions) $
|
||||||
command "fsck" SectionMaintenance
|
command "fsck" SectionMaintenance
|
||||||
"find and fix problems"
|
"find and fix problems"
|
||||||
paramPaths (seek <$$> optParser)
|
paramPaths (seek <$$> optParser)
|
||||||
|
@ -87,7 +87,7 @@ optParser desc = FsckOptions
|
||||||
))
|
))
|
||||||
|
|
||||||
seek :: FsckOptions -> CommandSeek
|
seek :: FsckOptions -> CommandSeek
|
||||||
seek o = do
|
seek o = allowConcurrentOutput $ do
|
||||||
from <- maybe (pure Nothing) (Just <$$> getParsed) (fsckFromOption o)
|
from <- maybe (pure Nothing) (Just <$$> getParsed) (fsckFromOption o)
|
||||||
u <- maybe getUUID (pure . Remote.uuid) from
|
u <- maybe getUUID (pure . Remote.uuid) from
|
||||||
i <- prepIncremental u (incrementalOpt o)
|
i <- prepIncremental u (incrementalOpt o)
|
||||||
|
|
4
debian/changelog
vendored
4
debian/changelog
vendored
|
@ -1,6 +1,8 @@
|
||||||
git-annex (5.20151102.2) UNRELEASED; urgency=medium
|
git-annex (5.20151102.2) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
* Use concurrent-output library for -Jn mode.
|
* Use concurrent-output library.
|
||||||
|
* Additional commands now suppport the -J flag for running multiple
|
||||||
|
actions concurrently with nicely displayed messages: fsck
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Wed, 04 Nov 2015 12:50:20 -0400
|
-- Joey Hess <id@joeyh.name> Wed, 04 Nov 2015 12:50:20 -0400
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,10 @@ With parameters, only the specified files are checked.
|
||||||
The [[git-annex-matching-options]](1)
|
The [[git-annex-matching-options]](1)
|
||||||
can be used to specify files to fsck.
|
can be used to specify files to fsck.
|
||||||
|
|
||||||
|
* `--jobs=N` `-JN`
|
||||||
|
|
||||||
|
Runs multiple fsck jobs in parallel. For example: `-J4`
|
||||||
|
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
|
|
||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
Loading…
Add table
Reference in a new issue