android_kernel_xiaomi_sm8350/drivers/md
NeilBrown 435b71be20 md: improve the is_mddev_idle test
During a 'resync' or similar activity, md checks if the devices in the
array are otherwise active and winds back resync activity when they are.
This test in done in is_mddev_idle, and it is somewhat fragile - it
sometimes thinks there is non-sync io when there isn't.

The test compares the total sectors of io (disk_stat_read) with the sectors
of resync io (disk->sync_io).  This has problems because total sectors gets
updated when a request completes, while resync io gets updated when the
request is submitted.  The time difference can cause large differenced
between the two which do not actually imply non-resync activity.  The test
currently allows for some fuzz (+/- 4096) but there are some cases when it
is not enough.

The test currently looks for any (non-fuzz) difference, either positive or
negative.  This clearly is not needed.  Any non-sync activity will cause
the total sectors to grow faster than the sync_io count (never slower) so
we only need to look for a positive differences.

If we do this then the amount of in-flight sync io will never cause the
appearance of non-sync IO.  Once enough non-sync IO to worry about starts
happening, resync will be slowed down and the measurements will thus be
more precise (as there is less in-flight) and control of resync will still
be suitably responsive.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-11 08:29:37 -07:00
..
raid6test
.gitignore
bitmap.c Remove do_sync_file_range() 2007-05-08 11:15:04 -07:00
dm-bio-list.h dm: bio list helpers 2007-05-09 12:30:47 -07:00
dm-bio-record.h
dm-crypt.c dm crypt: add null iv 2007-05-09 12:30:46 -07:00
dm-delay.c dm: delay target 2007-05-09 12:30:47 -07:00
dm-emc.c
dm-exception-store.c dm exception store: update dm io interface 2007-05-09 12:30:47 -07:00
dm-hw-handler.c
dm-hw-handler.h dm mpath: log device name 2007-05-09 12:30:46 -07:00
dm-io.c dm io: remove old interface 2007-05-09 12:30:47 -07:00
dm-io.h dm io: remove old interface 2007-05-09 12:30:47 -07:00
dm-ioctl.c [PATCH] mark struct file_operations const 4 2007-02-12 09:48:45 -08:00
dm-linear.c
dm-log.c dm log: fix resume failed log device 2007-05-09 12:30:48 -07:00
dm-log.h
dm-mpath.c dm mpath: log device name 2007-05-09 12:30:46 -07:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-raid1.c dm raid1: switch rh_in_sync to blocking in do_reads 2007-05-09 12:30:48 -07:00
dm-round-robin.c
dm-snap.c
dm-snap.h
dm-stripe.c
dm-table.c dm: allow offline devices 2007-05-09 12:30:47 -07:00
dm-target.c
dm-zero.c
dm.c dm mpath: log device name 2007-05-09 12:30:46 -07:00
dm.h
faulty.c [PATCH] md: Don't assume that READ==0 and WRITE==1 - use the names explicitly 2006-12-13 09:05:48 -08:00
Kconfig dm: delay target 2007-05-09 12:30:47 -07:00
kcopyd.c dm kcopyd: update dm io interface 2007-05-09 12:30:47 -07:00
kcopyd.h
linear.c [PATCH] fix read past end of array in md/linear.c 2007-03-16 19:25:03 -07:00
Makefile dm: delay target 2007-05-09 12:30:47 -07:00
md.c md: improve the is_mddev_idle test 2007-05-11 08:29:37 -07:00
mktables.c
multipath.c
raid0.c
raid1.c md: avoid a possibility that a read error can wrongly propagate through md/raid1 to a filesystem. 2007-05-10 09:26:53 -07:00
raid5.c Revert "md: improve partition detection in md array" 2007-05-09 18:51:36 -07:00
raid6.h
raid6algos.c
raid6altivec.uc
raid6int.uc
raid6mmx.c [PATCH] md: RAID6: clean up CPUID and FPU enter/exit code 2007-03-01 14:53:36 -08:00
raid6recov.c
raid6sse1.c [PATCH] md: RAID6: clean up CPUID and FPU enter/exit code 2007-03-01 14:53:36 -08:00
raid6sse2.c [PATCH] md: RAID6: clean up CPUID and FPU enter/exit code 2007-03-01 14:53:36 -08:00
raid6x86.h [PATCH] md: RAID6: clean up CPUID and FPU enter/exit code 2007-03-01 14:53:36 -08:00
raid10.c [PATCH] md: fix raid10 recovery problem. 2007-03-01 14:53:36 -08:00
unroll.pl
xor.c