summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2015-03-05 17:30:53 -0800
committerJP Abgrall <jpa@google.com>2015-03-05 17:30:53 -0800
commitfe6fcc4cc16a7b6c23910c24372cf1f6bce5006a (patch)
tree0ef7ba0d19ef38f49855fa8aa3e42e8ea0f9c7b9
parent232478759d809d53f708ba8c052c4cba3ff2b2d5 (diff)
downloadsystem_core-fe6fcc4cc16a7b6c23910c24372cf1f6bce5006a.tar.gz
system_core-fe6fcc4cc16a7b6c23910c24372cf1f6bce5006a.tar.bz2
system_core-fe6fcc4cc16a7b6c23910c24372cf1f6bce5006a.zip
fs_mgr: recognize a notrim mountpoint flag
Some partitions don't need trimming. Needs a vold:fstrim change Bug: 19624276 Change-Id: I8df715bd18688d7921afa2f3743f7d2a68760699
-rw-r--r--fs_mgr/fs_mgr_fstab.c6
-rw-r--r--fs_mgr/fs_mgr_priv.h1
-rw-r--r--fs_mgr/include/fs_mgr.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/fs_mgr/fs_mgr_fstab.c b/fs_mgr/fs_mgr_fstab.c
index ab8f128ce..64f7edc9c 100644
--- a/fs_mgr/fs_mgr_fstab.c
+++ b/fs_mgr/fs_mgr_fstab.c
@@ -68,6 +68,7 @@ static struct flag_list fs_mgr_flags[] = {
{ "zramsize=", MF_ZRAMSIZE },
{ "verify", MF_VERIFY },
{ "noemulatedsd", MF_NOEMULATEDSD },
+ { "notrim", MF_NOTRIM },
{ "defaults", 0 },
{ 0, 0 },
};
@@ -432,3 +433,8 @@ int fs_mgr_is_noemulatedsd(struct fstab_rec *fstab)
{
return fstab->fs_mgr_flags & MF_NOEMULATEDSD;
}
+
+int fs_mgr_is_notrim(struct fstab_rec *fstab)
+{
+ return fstab->fs_mgr_flags & MF_NOTRIM;
+}
diff --git a/fs_mgr/fs_mgr_priv.h b/fs_mgr/fs_mgr_priv.h
index 88a104088..efc7ca59b 100644
--- a/fs_mgr/fs_mgr_priv.h
+++ b/fs_mgr/fs_mgr_priv.h
@@ -76,6 +76,7 @@
#define MF_FORCECRYPT 0x400
#define MF_NOEMULATEDSD 0x800 /* no emulated sdcard daemon, sd card is the only
external storage */
+#define MF_NOTRIM 0x1000
#define DM_BUF_SIZE 4096
diff --git a/fs_mgr/include/fs_mgr.h b/fs_mgr/include/fs_mgr.h
index 0437d45c7..a7a0bdbff 100644
--- a/fs_mgr/include/fs_mgr.h
+++ b/fs_mgr/include/fs_mgr.h
@@ -94,6 +94,7 @@ int fs_mgr_is_nonremovable(struct fstab_rec *fstab);
int fs_mgr_is_verified(struct fstab_rec *fstab);
int fs_mgr_is_encryptable(struct fstab_rec *fstab);
int fs_mgr_is_noemulatedsd(struct fstab_rec *fstab);
+int fs_mgr_is_notrim(struct fstab_rec *fstab);
int fs_mgr_swapon_all(struct fstab *fstab);
#ifdef __cplusplus
}