vold: add ro.vold.umsdirtyratio property

This allows control of what /proc/sys/vm/dirty_ratio is used when USB mounting.
Some platforms like the HTC Desire (bravo) get a _HUGE_ performance boost when
writing to the sdcard when USB mounting if this is set to 20 (which is the default)
on the HTC Desire.

This addresses this issue: http://code.google.com/p/cyanogenmod/issues/detail?id=2949

Basicly it makes it possible to undo or control the effect of this commit:
https://github.com/CyanogenMod/android_system_vold/commit/a28056b38275003895ff5d9576681aca01544822

Change-Id: I86b7bbd02695fb0c19f39448714a219257bf806f
DirectVolume: handle discs with multiple major numbers

CFlag: BOARD_VOLD_DISC_HAS_MULTIPLE_MAJORS

Allows Direct Volume to handle discs with multiple major numbers.
Needed on Samsung Galaxy S II and variants.

For example:
mmcblk0p1 - 179:0
mmcblk0p2 - 179:1
mmcblk0p3 - 179:2
mmcblk0p4 - 256:0
mmcblk0p5 - 256:1

Change-Id: I633ac882a721cde25f0df779b4028efa6be15750
vold: fix an offset one bug that makes partition 4 unusable

Change-Id: Ic8e18e6191ad7ee33162e36060b57a6802cf0883
vold: Add ntfs (read-only) support.

See http://review.cyanogenmod.com/#change,7457 for more info.

Change-Id: Ic841e73be6435e8bbbb22984cc749e27c46826e8
vold: Allow pre-configured device pairs to switch mountpoints

The use-case for this are devices with internal extended storage
(pseudo-SDCard emmc) and an actual microSD card reader.
In CM, we choose to use the microSD as primary storage, and leave
the internal partition mostly unused; some users usually come up with
imaginative and data-destroying ways of working around that.

This allows us to specify a pair of mountpoints which can be
switched from a user preference. For this vold.fstab:

-----
dev_mount sdcard /mnt/sdcard ...<path-to-microSD-sysfs>
dev_mount emmc /mnt/emmc ...<path-to-emmc-partition>
-----

We can add to build.prop:
"ro.vold.switchablepair=/mnt/sdcard,/mnt/emmc"

A persistent toggle (persist.sys.vold.switchexternal), controllable
through CMParts, can be presented to the user to allow choosing
something other than our default as primary storage.

Change-Id: I9559fa442c833e3168287d820b7b8347736abb15
vold: fix handling of discs with multiple majors on DirectVolume::getShareDevice()

The method DirectVolume::getShareDevice() returns an invalid device if the partition referenced by
mPartIdx is bad. A bad partition is one where the major/minor numbers on disk don't match what is
expected.

The original major number is stored for bad partitions so the fix attempts to retrieve it and
return it if applicable.

This fix is one part of fixing ICS encryption on the i777 (and possibly other devices) where bad
partitions may exist.

Change-Id: Ic3b05dbf45315bde502c151f53928ca1891483f0
UMS support with any volume, not only primary (1/3)

This patch enables UMS support when any volume supports it, even when the
primary storage doesn't.

1. Vold: assign lun_numbers sequentially to the volumes being added to the
   VolumeManager.
2. Fix portions of code which assume that the device has UMS support iff the
   primary storage supports UMS.
   Instead, determine whether the device supports UMS by checking each volume.
3. Display the UMS option in Settings.apk when any volume supports it.

Change-Id: I3976ee4a26f1ae7bd3faee814d3740312588f4c8
Signed-off-by: Oran Avraham <oranav@gmail.com>

Conflicts:
	VolumeManager.cpp