All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: zeroes read back more often than appended
@ 2003-10-07 19:02 Pat LaVarre
  2003-10-07 20:54 ` Pat LaVarre
  2003-10-08  3:49 ` Ben Fennema
  0 siblings, 2 replies; 36+ messages in thread
From: Pat LaVarre @ 2003-10-07 19:02 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: linux_udf

Maybe I should have cc'ed linux-fsdevel@vger.kernel.org when I launched
this thread in linux_udf@hpesjro.fc.hp.com ...

-----Forwarded Message-----

Subject: zeroes read back more often than appended
Date: 06 Oct 2003 21:54:15 -0600
To: linux_udf@hpesjro.fc.hp.com

Is it legit to combine mkudffs 1.0.0b2 with linux-2.6.0-test6?

And to run mkudffs on top of a loop device?

I ask because:

I wrote the following short programs (a bash script and a C routine) to
fopen, iterate "height" times to fwrite a "width" of bytes once or
repeatedly, and fclose.

With mkfs and ext3, I see this trivial code reliably produces expected
results i.e. a file full of '\xAA' e.g.

00000000  aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa  |................|
*
00fffff0  aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa     |...............|

With linux-2.6.0-test6 mkudffs and udf.ko of 1 GiB loop device, I see
this trivial code reliably produces wrong results for certain small
width and height combinations, such as:

udfwh mkudffs 0xFFFF 0xC00
udfwh mkudffs 0xFFFFFF 0xB
udfwh mkudffs 0xFFFFFFF 0x1
udfwh mkudffs 0x7800000 0x1

With mkudffs, my results grow indeterminate below somewhere near the
0x7800000 boundary (120 MiB).  0x7400000 often fails.  My logs tell me
0x7298000 once failed for me, but I can't easily repeat that result.

My wrong results have lots of zeroes in place of the data written e.g.

hexdump -C wh.bin | head -3
00000000  aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa  |................|
*
0375e000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

Every time I've looked, the zeroes appear aligned to at least 2 KiB
boundaries.

Explanations, anyone?

Pat LaVarre

/// udfwh

#!/bin/bash -x

rm dd.bin
dd if=/dev/zero of=dd.bin bs=1M seek=1023 count=1
ls -l dd.bin
sudo losetup /dev/loop0 dd.bin
sudo $1 2>&1 | head -1
sudo $1 /dev/loop0
sudo mount /dev/loop0 /mnt/loop0
sudo chown `id -u`:`id -g` /mnt/loop0/.
cd /mnt/loop0
time wh $2 $3
cd -
sudo umount /mnt/loop0
sudo losetup -d /dev/loop0

/// wh.c

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char * argv[]) // 0xFF600 0xC8
{
	int width;
	int height;
	char * chars;
	char nonzero;
	FILE * fi;
	int i;
	int rc;
	char const * st;

	--argc; ++argv;
	assert(argc == 2);
	rc = sscanf(argv[0], "0x%X", &width);
	assert(rc == 1);
	rc = sscanf(argv[1], "0x%X", &height);
	assert(rc == 1);

	nonzero = '\xAA';
	chars = malloc(width);
	assert(chars != NULL);
	memset(&chars[0], nonzero, width);

	fi = fopen("wh.bin", "wb");
	assert(fi != NULL);
	for (i = 0; i < height; ++i) {
		fprintf(stderr, "\r%d ", height - i - 1);
		rc = fwrite(chars, 1, width, fi);
		assert(rc == width);
	}
	rc = fclose(fi);
	assert(rc == 0);
	fprintf(stderr, "\n");

	st = "hexdump -C wh.bin | head -3";
	fprintf(stderr, "%s\n", st);
	(void) system(st);

	return 0;
}

/// dmesg (boring, I think?)

> UDF-fs DEBUG fs/udf/lowlevel.c:65:udf_get_last_session: CDROMMULTISESSION not supported: rc=-22
> UDF-fs DEBUG fs/udf/super.c:1471:udf_fill_super: Multi-session=0
> UDF-fs DEBUG fs/udf/super.c:459:udf_vrs: Starting at sector 16 (2048 byte sectors)
> UDF-fs DEBUG fs/udf/super.c:802:udf_load_pvoldesc: recording time 1065498482/249678, 2003/10/06 21:48 (1e98)
> UDF-fs DEBUG fs/udf/super.c:813:udf_load_pvoldesc: volIdent[] = 'LinuxUDF'
> UDF-fs DEBUG fs/udf/super.c:820:udf_load_pvoldesc: volSetIdent[] = '3f823772LinuxUDF'
> UDF-fs DEBUG fs/udf/super.c:1012:udf_load_logicalvol: Partition (0:0) type 1 on volume 1
> UDF-fs DEBUG fs/udf/super.c:1022:udf_load_logicalvol: FileSet found in LogicalVolDesc at block=32, partition=0
> UDF-fs DEBUG fs/udf/super.c:850:udf_load_partdesc: Searching map: (0 == 0)
> UDF-fs DEBUG fs/udf/super.c:891:udf_load_partdesc: unallocSpaceBitmap (part 0) @ 0
> UDF-fs DEBUG fs/udf/super.c:932:udf_load_partdesc: Partition (0:0 type 1511) starts at physical 274, block length 523757
> UDF-fs DEBUG fs/udf/super.c:1265:udf_load_partition: Using anchor in block 256
> UDF-fs DEBUG fs/udf/super.c:1498:udf_fill_super: Lastblock=0
> UDF-fs DEBUG fs/udf/super.c:774:udf_find_fileset: Fileset at block=32, partition=0
> UDF-fs DEBUG fs/udf/super.c:836:udf_load_fileset: Rootdir at block=34, partition=0
> UDF-fs INFO UDF 0.9.7 (2002/11/15) Mounting volume 'LinuxUDF', timestamp 2003/10/06 21:48 (1e98)

///




^ permalink raw reply	[flat|nested] 36+ messages in thread
* editable udf metadata
@ 2003-11-26 15:58 Pat LaVarre
  0 siblings, 0 replies; 36+ messages in thread
From: Pat LaVarre @ 2003-11-26 15:58 UTC (permalink / raw)
  To: linux-fsdevel

Kindly offline I was asked to summarise & elaborate:

1)

The udfct udf_test (aka the Philips UDF Verifier) encourages you to
fetch udftools via cvs rather than via http of sourceforge, per such
procedures as:

http://marc.theaimsgroup.com/?l=linux-fsdevel&m=106692617907993

List:     linux-fsdevel
Subject:  Re: editable udf metadata
Date:     2003-10-23 16:06:26

2)

The cvs udftools you get that way didn't change between 2003-10-24 and
2003-11-26.

3)

A snapshot of the cvs udftools, by design likely to fall behind just as
http sourceforge does, appears at:

ftp://members.aol.com/plscsi/linux/

4)

When fetching via plscsi/ you can say http rather than ftp if you like:

http://members.aol.com/plscsi/linux/

Pat LaVarre



^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2003-11-26 15:59 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-07 19:02 zeroes read back more often than appended Pat LaVarre
2003-10-07 20:54 ` Pat LaVarre
2003-10-08  3:49 ` Ben Fennema
2003-10-08 16:41   ` Pat LaVarre
2003-10-08 16:47     ` editable udf metadata Pat LaVarre
2003-10-08 17:51       ` Pat LaVarre
2003-10-08 18:09         ` big-endian udfct_1_0r2 Pat LaVarre
2003-10-08 18:30           ` Matthew Wilcox
     [not found]             ` <3F8472FE.9040403@lougher.demon.co.uk>
2003-10-08 19:49               ` Matthew Wilcox
2003-10-08 20:43             ` Phillip Lougher
2003-10-21 21:54         ` editable udf metadata Pat LaVarre
2003-10-21 23:17           ` Pat LaVarre
2003-10-23 16:06             ` Pat LaVarre
2003-10-24 21:40               ` Pat LaVarre
2003-10-22  8:15           ` same page access Mark B
2003-10-22 11:21             ` Matthew Wilcox
2003-10-22 17:09               ` Mark B
2003-10-22 17:10                 ` Matthew Wilcox
2003-10-08 17:02     ` zeroes read back more often than appended Pat LaVarre
2003-10-08 17:06       ` toggling smp clears x86_mce_p4thermal of make xconfig Pat LaVarre
2003-10-08 17:21     ` zeroes read back more often than appended Pat LaVarre
2003-10-08 16:46   ` soft trace of read/write of drivers/block/loop.c Pat LaVarre
2003-10-08 20:32   ` zeroes read back more often than appended Pat LaVarre
2003-10-09 20:54   ` Pat LaVarre
2003-10-10  0:52     ` Pat LaVarre
2003-10-10 16:39       ` Pat LaVarre
2003-10-10 18:15         ` Pat LaVarre
2003-10-14  0:38           ` Pat LaVarre
2003-10-14  1:48             ` Pat LaVarre
2003-10-20 23:20               ` Pat LaVarre
2003-10-21 14:47                 ` Pat LaVarre
2003-10-21 16:46                   ` Pat LaVarre
2003-10-21 18:44                     ` Pat LaVarre
2003-10-23 18:52                     ` Pat LaVarre
2003-10-27 21:55                       ` Pat LaVarre
2003-11-26 15:58 editable udf metadata Pat LaVarre

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.