Closed GoogleCodeExporter closed 8 years ago
$ dd if=/dev/zero bs=1k seek=$((1024*1024*2 + 1)) count=1 of=/tmp/yyyy
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 7.9554e-05 s, 12.9 MB/s
$ /usr/bin/scrub -p nnsa /tmp/yyyy
scrub: using NNSA NAP-14.1-C patterns
scrub: padding /tmp/yyyy with 2048 bytes to fill last fs block
scrub: scrubbing /tmp/yyyy 2147487744 bytes (~2GB)
scrub: random |.....^C |
mrhankey /home/garlick/proj/diskscrub/diskscrub > dd if=/dev/zero bs=1k
seek=$((1024*1024*3)) count=1 of=/tmp/yyyy
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 9.1152e-05 s, 11.2 MB/s
$ /usr/bin/scrub -p nnsa /tmp/yyyy
scrub: using NNSA NAP-14.1-C patterns
scrub: padding /tmp/yyyy with 3072 bytes to fill last fs block
scrub: scrubbing /tmp/yyyy 3221229568 bytes (~3GB)
scrub: random |.scrub: /tmp/yyyy: No such process
Here's the fix
$ git show 95e14224da038ce7e0e979c296149404943af600
commit 95e14224da038ce7e0e979c296149404943af600
Author: Jim Garlick <garlick.jim@gmail.com>
Date: Wed Jun 20 14:39:18 2012 -0700
Fix scrub aborts with No such process (issue 19)
Used an int instead of an off_t to hold file size.
This was introduced with fillfile threading in scrub-2.5.0.
Failure is immediate and obvious for targets > 2G.
diff --git a/src/fillfile.c b/src/fillfile.c
index 9055746..e0f67b6 100644
--- a/src/fillfile.c
+++ b/src/fillfile.c
@@ -74,7 +74,7 @@ refill_thread(void *arg)
static int
refill_memcpy(struct memstruct *mp, unsigned char *mem, int memsize,
- int filesize, int written)
+ off_t filesize, off_t written)
{
#if WITH_PTHREADS
if (no_threads) {
Original comment by garlick....@gmail.com
on 20 Jun 2012 at 9:47
I am also getting the same error using version 2.5.3. can you let me know if it
has been already implement in 2.5.22 version or yet to be implemented. How do
it fix it manually ? do i need to use "int" in place of "off_t" ? and recompile
with make again
Appreciate any help provided. The tool seems to be awesome and really would
like to use it.
Thanks
Banku
Original comment by bankur...@gmail.com
on 17 Sep 2012 at 8:34
Hi Banku - that change went in 2.5.2. There is no 2.5.3.
If you are building from source could you check your src/fillfile.c line 77
to see if the above patch has been applied? If not then please verify
your version - what does the META file in top level directory say?
Original comment by garlick....@gmail.com
on 17 Sep 2012 at 10:47
Original issue reported on code.google.com by
garlick....@gmail.com
on 19 Jun 2012 at 3:50