vold: allow override of MAX_PARTITIONS for devices with > 4 partitions

Change-Id: Iec4de6e7e5ad52a6dfa45952bb19104f500d9c58a
Reintroduce BOARD_VOLD_EMMC_SHARES_DEV_MAJOR

Code taken from CM7's vold
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: 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
vold: use blkid to detect filesystem type

In preparation for handling ext4 partitions via vold and fuse.

Change-Id: Ibaccded63a7a293ad53f16afb80448ddd493554c
vold: add support for ext4 media

Depends on:
http://review.cyanogenmod.org/31202
http://review.cyanogenmod.org/31211

Result:
http://pastebin.com/nzUbvW7K

Change-Id: I5bd227e637f2a1ed4d13a2eb81390c56c953f482
vold: exFAT support

 * Add support for exFAT using FUSE implementation.

Change-Id: I590c7b1bc8fbcb8c0b2c669f4073ac022857e4da
vold: Add NTFS read+write support via ntfs-3g

 * Use ntfs-3g for full NTFS support.
 * Original code from Freescale.

Change-Id: I01191c3c339421904dc9415eb00143f7f8365152
vold: Replace usage of discontinued logwrap()

Change-Id: Ia76bf8998064beee5e0ea4451c4dd8418c2193c4
vold: Format filesystems as exfat, if already exfat.

Change-Id: I1474fa3d3264e6466c2f74e91f16bd2515f50d06
Revenge of MiniVold (the sequel)

 * We'd like to utilize Vold's capabilities for performing various
   operations while in recovery mode.
 * Create a small, static library which can be linked into a single-call
   binary such as recovery.
 * Configurable helper paths.
 * Fixed various build warnings.

Change-Id: Ia4b929c2d7815d73f488ad406652f14b2a6aa4ce
cryptfs: also unmount /data/data before encrypting

galaxysmtd mounts /data/data on top on /data when unencrypted for
performance reason, so when encrypting, we need to unmount that
first before we can unmount /data.

On other devices, umount on a non-mounted folder will silently
succeed.

Change-Id: I07a73534fb3e253b702a4be6f976594644795e36
Build minivold for recovery

 * We can't link to the main recovery executable due to various issues,
   so just build a static minivold.

 * Updated for 4.4

Change-Id: If110aa4fca9608d5c2a03f471773e7ce2c77dc91
Apply the mounts to the SDCARD /storage path instead of /mnt/media_rw
vold: restore 4.4 sdcard logic

Mount points in 4.4 are always fuse-wrapped to provide granular
permission. Unix file systems no longer need to be manually
fuse-wrapped by us.

Change-Id: I6885b0baeaae7c380ec32d410a70a4f53801157b
vold: fix crash for non-emulated primary storage

When EMULATED_STORAGE_SOURCE is not set, emulated_source
will be null

Change-Id: I22d040eda498d4c2a5becd367eb5b9a55a494e0b
Merge "vold: restore 4.4 sdcard logic" into cm-11.0