android_kernel_xiaomi_sm8350/include/linux/raid
NeilBrown d785a06a0b [PATCH] md/bitmap: change md/bitmap file handling to use bmap to file blocks
If md is asked to store a bitmap in a file, it tries to hold onto the page
cache pages for that file, manipulate them directly, and call a cocktail of
operations to write the file out.  I don't believe this is a supportable
approach.

This patch changes the approach to use the same approach as swap files.  i.e.
bmap is used to enumerate all the block address of parts of the file and we
write directly to those blocks of the device.

swapfile only uses parts of the file that provide a full pages at contiguous
addresses.  We don't have that luxury so we have to cope with pages that are
non-contiguous in storage.  To handle this we attach buffers to each page, and
store the addresses in those buffers.

With this approach the pagecache may contain data which is inconsistent with
what is on disk.  To alleviate the problems this can cause, md invalidates the
pagecache when releasing the file.  If the file is to be examined while the
array is active (a non-critical but occasionally useful function), O_DIRECT io
must be used.  And new version of mdadm will have support for this.

This approach simplifies a lot of code:
 - we no longer need to keep a list of pages which we need to wait for,
   as the b_endio function can keep track of how many outstanding
   writes there are.  This saves a mempool.
 - -EAGAIN returns from write_page are no longer possible (not sure if
    they ever were actually).

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:38 -07:00
..
bitmap.h [PATCH] md/bitmap: change md/bitmap file handling to use bmap to file blocks 2006-06-26 09:58:38 -07:00
linear.h [PATCH] md: allow a linear array to have drives added while active 2006-06-26 09:58:37 -07:00
md_k.h [PATCH] md: allow checkpoint of recovery with version-1 superblock 2006-06-26 09:58:37 -07:00
md_p.h [PATCH] md: allow checkpoint of recovery with version-1 superblock 2006-06-26 09:58:37 -07:00
md_u.h
md.h [PATCH] md: make md_print_devices() static 2006-06-26 09:58:37 -07:00
multipath.h
raid0.h
raid1.h
raid5.h [PATCH] md: merge raid5 and raid6 code 2006-06-26 09:58:37 -07:00
raid10.h [PATCH] md: support stripe/offset mode in raid10 2006-06-26 09:58:37 -07:00
xor.h