From: John Kennedy <jk@csuchico.edu>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: loopback block sizes vs. truncation
Date: Thu, 30 Nov 2000 15:35:35 -0800 [thread overview]
Message-ID: <20001130153535.A10494@north.csuchico.edu> (raw)
In trying to test the international crypto patch-2.2.17.11pre1 I was
doing some QA on my bootloader program. It looks like the loopback
device will return EOF before a file is finished.
In my case in particular, I was using files instead of block devices
(again, for testing) and had a nulled loop_info so I wasn't dealing with
encryption at that point. I had a 7851-byte test file, which happens
to be (7*1024)+683. The general setup was:
(<stdin> -> /dev/loop0) -> <stdout> [ < /tmp/in > /tmp/out ]
... which should equate to
(/tmp/in -> /dev/loop0) -> /tmp/out
I was getting a output file truncated at 7168 (7*1024) bytes. That
wasn't even a multiple of 4096, which is st_blksize if you stat() the
input, output, or loopback file descriptors.
No problems with files that are multiples of 1K so far.
I assume it is just giving me the finger because the leftover 683
bytes aren't a multiple of the block size, but right now I'm not sure
how to go about getting the proper block size anyway.
No real problem dealing with it, but it made me wonder what was going
on with the whole 1K/4K filesystem block size again.
[This is with a patched 2.2.18pre24 kernel.]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
reply other threads:[~2000-12-01 0:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20001130153535.A10494@north.csuchico.edu \
--to=jk@csuchico.edu \
--cc=linux-kernel@vger.kernel.org \
/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®