commit | 6bbb3906d09ec7eaf92f2d72645fa0a7b51b8aee | [log] [tgz] |
---|---|---|
author | JP Abgrall <jpa@google.com> | Thu Mar 05 17:30:20 2015 -0800 |
committer | JP Abgrall <jpa@google.com> | Thu Mar 05 17:30:20 2015 -0800 |
tree | 2c10aa169e3f5aeac153535a8a338d62ec1fd3c4 | |
parent | 68fe15243be92dfaf28ee02c07ea49dcec8657d3 [diff] [blame] |
fstrim: don't trim mount points flagged as notrim Bug: 19624276 Change-Id: I84eeb029114d6ba2a26a53d4155d123d8acd7502
diff --git a/fstrim.c b/fstrim.c index 2c24fc9..231d66e 100644 --- a/fstrim.c +++ b/fstrim.c
@@ -88,6 +88,9 @@ if (fs_mgr_is_voldmanaged(&fstab->recs[i])) { continue; /* Should we trim fat32 filesystems? */ } + if (fs_mgr_is_notrim(&fstab->recs[i])) { + continue; + } fd = open(fstab->recs[i].mount_point, O_RDONLY | O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW); if (fd < 0) {