[Yaffs] CONFIG_YAFFS_USE_GENERIC_RW

Charles Manning Charles.Manning@trimble.co.nz
Thu, 14 Oct 2004 12:12:36 +1300


This is a historic thing.
USE_GENERIC_RW uses the Linux page cache for read/write. This means that =
the Linux generic_read and generic_write functions are used which and =
YAFFS supplies the read_page write_page calls.

Not defining USE_GENERIC_RW directly implements read/write without using =
the page cache.

The direct read/write stuff was iimplemented first, and I followed it by =
generic read/write when memory mapping was implemented. During the =
transition both options worked. Things have now moved on and not =
defining USE_GENERIC_RW is broken, with no real motivation to fix it.=20

Ie. You should always define USE_GENERIC_RW.=20

This comes up every couple of months on the list. I guess I should pull =
it out.


-- Charles




-----Original Message-----
From: yaffs-admin@stoneboat.aleph1.co.uk =
[mailto:yaffs-admin@stoneboat.aleph1.co.uk] On Behalf Of Ulla
Sent: Thursday, 14 October 2004 11:40 a.m.
To: yaffs@stoneboat.aleph1.co.uk
Subject: [Yaffs] CONFIG_YAFFS_USE_GENERIC_RW


Hi,

I am using yaffs (CVS) (linux 2.6.8.1, mtd-snapshot: 20041005), and I am =
able=20
to mount the device properly, to write to the flash and erase from the =
flash.=20
But with CONFIG_YAFFS_USE_GENERIC_RW disabled copying back (or cat) =
doesn't=20
work, it is running in an endless loop. For example, catting a simple =
text=20
file will endlessly repeat the contents of that file.  Copying a file =
will=20
not end & create a huge file at the destination.  By enabling=20
CONFIG_YAFFS_USE_GENERIC_RW everything is ok. Can someone explain what =
are=20
the benefits of disabling CONFIG_YAFFS_USE_GENERIC_RW (like it is in the =

default Makefile) and what are the exact differences between generic_rw =
and=20
yaffs_rw?

Thanks a lot
   Ulla
--=20
Bluewater Systems Ltd - ARM Technology Solution Centre

=A0 =A0 =A0 =A0 Ulrike Eisenmann=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 Bluewater Systems Ltd
Phone: +64 3 3779127 (Aus +1 800 148 751) =A0 =A0 =A0 Level 17, 119 =
Armagh St
Fax: =A0 +64 3 3779135 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0PO Box 13889
Email: ulla@bluewatersys.com   =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0Christchurch
Web: =A0 http://www.bluewatersys.com =A0 =A0 =A0 =A0 =A0 =A0 =A0New =
Zealand

_______________________________________________
yaffs mailing list
yaffs@stoneboat.aleph1.co.uk =
http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs