Files
kernel-eswin-eic7700/include/linux
OGAWA Hirofumi 111ebb6e6f [PATCH] writeback: fix range handling
When a writeback_control's `start' and `end' fields are used to
indicate a one-byte-range starting at file offset zero, the required
values of .start=0,.end=0 mean that the ->writepages() implementation
has no way of telling that it is being asked to perform a range
request.  Because we're currently overloading (start == 0 && end == 0)
to mean "this is not a write-a-range request".

To make all this sane, the patch changes range of writeback_control.

So caller does: If it is calling ->writepages() to write pages, it
sets range (range_start/end or range_cyclic) always.

And if range_cyclic is true, ->writepages() thinks the range is
cyclic, otherwise it just uses range_start and range_end.

This patch does,

    - Add LLONG_MAX, LLONG_MIN, ULLONG_MAX to include/linux/kernel.h
      -1 is usually ok for range_end (type is long long). But, if someone did,

		range_end += val;		range_end is "val - 1"
		u64val = range_end >> bits;	u64val is "~(0ULL)"

      or something, they are wrong. So, this adds LLONG_MAX to avoid nasty
      things, and uses LLONG_MAX for range_end.

    - All callers of ->writepages() sets range_start/end or range_cyclic.

    - Fix updates of ->writeback_index. It seems already bit strange.
      If it starts at 0 and ended by check of nr_to_write, this last
      index may reduce chance to scan end of file.  So, this updates
      ->writeback_index only if range_cyclic is true or whole-file is
      scanned.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Nathan Scott <nathans@sgi.com>
Cc: Anton Altaparmakov <aia21@cantab.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: "Vladimir V. Saveliev" <vs@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:42:49 -07:00
..
2006-01-08 20:14:02 -08:00
2006-03-21 08:52:18 -08:00
2006-01-13 09:12:21 -08:00
2005-10-04 13:22:01 -07:00
2005-06-23 09:45:26 -07:00
2005-09-10 10:06:21 -07:00
2006-03-24 07:33:20 -08:00
2006-03-28 09:16:05 -08:00
2006-03-23 07:38:09 -08:00
2005-09-10 10:16:27 -07:00
2006-03-27 08:44:59 -08:00
2005-05-15 18:31:07 -04:00
2006-03-27 08:44:59 -08:00
2006-06-08 15:14:23 -07:00
2005-05-19 22:43:37 -07:00
2006-03-31 12:18:54 -08:00
2006-01-18 19:20:29 -08:00
2005-07-12 12:08:43 -07:00
2005-11-10 02:26:41 +01:00
2006-03-26 08:56:56 -08:00
2006-03-27 08:44:51 -08:00
2005-06-15 12:38:14 +01:00
2005-11-08 17:14:08 +01:00
2005-05-05 14:25:59 -07:00
2005-11-08 09:40:47 -08:00
2005-07-05 15:03:46 -07:00
2005-09-19 15:41:28 -07:00
2006-03-20 17:09:11 -08:00
2006-03-20 22:41:23 -08:00
2006-01-06 13:24:54 -08:00
2006-06-20 20:24:58 -07:00
2006-02-08 01:03:52 -05:00
2005-06-21 18:46:32 -07:00
2006-01-06 13:24:29 -08:00
2006-03-20 22:21:10 -08:00
2006-06-21 12:40:49 -07:00
2005-04-25 18:32:12 -07:00
2006-06-23 07:42:49 -07:00
2005-10-08 15:00:57 -07:00
2005-10-30 17:37:17 -08:00
2006-04-29 18:33:15 -07:00
2006-03-23 07:38:12 -08:00
2006-06-05 12:29:17 -07:00
2005-10-28 08:16:47 -07:00
2006-03-22 07:53:57 -08:00
2006-03-23 07:38:14 -08:00
2006-03-23 07:38:14 -08:00
2006-03-20 13:44:40 -05:00
2006-03-20 13:44:27 -05:00
2006-06-23 07:42:46 -07:00
2006-06-22 15:05:56 -07:00
2006-03-27 08:44:48 -08:00
2006-05-04 06:55:12 +02:00
2006-06-23 07:42:49 -07:00
2005-11-07 07:53:46 -08:00
2006-03-27 08:44:51 -08:00
2005-10-30 11:14:39 +11:00
2006-06-17 21:29:55 -07:00
2006-03-23 07:38:12 -08:00
2005-10-30 17:37:32 -08:00
2006-04-02 00:08:05 -05:00
2005-11-07 07:53:37 -08:00
2006-03-28 09:16:05 -08:00
2005-09-10 10:06:21 -07:00
2006-06-23 07:42:47 -07:00
2005-09-05 00:05:45 -07:00
2006-06-23 07:42:47 -07:00
2005-10-30 17:37:32 -08:00
2005-09-18 00:18:32 -07:00
2006-03-26 08:57:03 -08:00
2006-03-31 12:18:56 -08:00
2006-01-12 14:06:38 -08:00
2006-01-10 08:01:59 -08:00
2006-03-23 07:38:14 -08:00
2006-03-23 07:12:57 -05:00