loopback block sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  In trying to test 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.

  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 being
given 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.

Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux