From: Nick Dokos <nicholas.dokos@hp.com>
To: Andreas Dilger <adilger@sun.com>
Cc: Valerie Aurora <vaurora@redhat.com>, linux-ext4@vger.kernel.org
Cc: nicholas.dokos@hp.com
Subject: Re: ll_ver_fs data verification failure - 96TB fs
Date: Thu, 06 Aug 2009 18:54:32 -0400 [thread overview]
Message-ID: <19332.1249599272@alphaville.usa.hp.com> (raw)
In-Reply-To: Message from Nick Dokos <nicholas.dokos@hp.com> of "Thu, 06 Aug 2009 18:01:04 EDT." <18945.1249596064@alphaville.usa.hp.com>
> ...
> The code should perhaps read something like this:
>
> if ((nread = read(fd, chunk_buf, chunksize)) < 0) {
> fprintf(stderr, "\n%s: read %s+%llu failed: %s\n",
> progname, file, offset, strerror(errno));
> return 1;
> }
> if (nread < chunksize) {
> fprintf(stderr, "short read etc");
> /* or force the next read() to check for errors? */
> return 1;
> }
> if (verify_chunk(chunk_buf, chunksize, offset, time_st,
> inode_st, file) != 0)
> return 1;
>
... except that the write() side also does not deal with short writes,
and for a full run, the last file of the last directory will probably be
short even if no errors occur. In that case, the short read is not an
error.
Thanks,
Nick
next prev parent reply other threads:[~2009-08-06 22:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 13:54 ll_ver_fs data verification failure - 96TB fs Nick Dokos
2009-08-03 14:22 ` Nick Dokos
2009-08-06 20:04 ` Valerie Aurora
2009-08-06 20:37 ` Nick Dokos
2009-08-06 20:50 ` Andreas Dilger
2009-08-06 21:28 ` Nick Dokos
2009-08-06 21:43 ` Nick Dokos
2009-08-06 22:01 ` Nick Dokos
2009-08-06 22:54 ` Nick Dokos [this message]
2009-08-06 22:19 ` Andreas Dilger
2009-08-06 20:36 ` Valerie Aurora
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19332.1249599272@alphaville.usa.hp.com \
--to=nicholas.dokos@hp.com \
--cc=adilger@sun.com \
--cc=linux-ext4@vger.kernel.org \
--cc=vaurora@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.