From: Dave Johnson <djohnson@sw.starentnetworks.com>
To: Chris Mason <mason@suse.com>
Cc: agruen@suse.de, Olaf Hering <olh@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: cramfs mounts provide corrupted content since 2.6.15
Date: Tue, 28 Feb 2006 16:08:21 -0500 [thread overview]
Message-ID: <17412.48069.779583.804584@zeus.sw.starentnetworks.com> (raw)
In-Reply-To: <200602281553.01094.mason@suse.com>
Chris Mason writes:
> On Tuesday 28 February 2006 15:40, Dave Johnson wrote:
>
> > What version of mkcramfs are you using? Empty regular files should
> > have offset set to 0 already.
>
> The image is being generated by util-linux 2.12r (this is the root disk for
> the SUSE 10.1 install).
>
> I checked via hexdump, the offset for mtab is definitely not zero.
>
> -chris
>
Ah, that makes sense now.
parse_directory() is different between util-linux 2.12r and
cramfstools 1.1:
util-linux 2.12r:
} else if (S_ISREG(st.st_mode)) {
entry->path = strdup(path);
if (entry->size) {
if (entry->size >= (1 << CRAMFS_SIZE_WIDTH)) {
warn_size = 1;
entry->size = (1 << CRAMFS_SIZE_WIDTH) - 1;
}
}
cramfstools 1.1:
} else if (S_ISREG(st.st_mode)) {
if (entry->size) {
if (access(path, R_OK) < 0) {
warn_skip = 1;
continue;
}
entry->path = strdup(path);
if (!entry->path) {
die(MKFS_ERROR, 1, "strdup failed");
}
if ((entry->size >= 1 << CRAMFS_SIZE_WIDTH)) {
warn_size = 1;
entry->size = (1 << CRAMFS_SIZE_WIDTH) - 1;
}
}
in cramfstools entry->path is not set for empty files causing
write_data() to keep offset set to 0.
--
Dave Johnson
Starent Networks
next prev parent reply other threads:[~2006-02-28 21:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-25 11:08 Olaf Hering
2006-02-25 12:55 ` Olaf Hering
2006-02-25 16:38 ` Dave Johnson
2006-02-25 22:01 ` Olaf Hering
2006-02-27 16:31 ` Dave Johnson
2006-02-28 19:14 ` Chris Mason
2006-02-28 20:40 ` Dave Johnson
2006-02-28 20:53 ` Chris Mason
2006-02-28 21:08 ` Dave Johnson [this message]
2006-02-28 21:13 ` Chris Mason
[not found] ` <20060301155813.245d71ff.akpm@osdl.org>
[not found] ` <20060301235858.GA6792@suse.de>
[not found] ` <17414.16541.260439.712849@zeus.sw.starentnetworks.com>
[not found] ` <20060302115446.GA9708@suse.de>
[not found] ` <20060302093216.67b90533.akpm@osdl.org>
2006-03-02 17:45 ` [PATCH] " Dave Johnson
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=17412.48069.779583.804584@zeus.sw.starentnetworks.com \
--to=djohnson@sw.starentnetworks.com \
--cc=agruen@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mason@suse.com \
--cc=olh@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®