OSDN Git Service

Flush clusters bitmap on each file close.
authorrelan <relan@users.noreply.github.com>
Sat, 7 Nov 2015 08:10:29 +0000 (11:10 +0300)
committerrelan <relan@users.noreply.github.com>
Sat, 7 Nov 2015 08:25:48 +0000 (11:25 +0300)
Put FS into a clean state when all files are closed. Flush to the
non-volatile storage is not enforced though, so there can (and most
probably will) be some dirty data in various OS- and hardware-controlled
caches.

libexfat/node.c

index f3d10e0..d05f20d 100644 (file)
@@ -664,7 +664,7 @@ int exfat_flush_node(struct exfat* ef, struct exfat_node* node)
        }
 
        node->flags &= ~EXFAT_ATTRIB_DIRTY;
        }
 
        node->flags &= ~EXFAT_ATTRIB_DIRTY;
-       return 0;
+       return exfat_flush(ef);
 }
 
 static bool erase_entry(struct exfat* ef, struct exfat_node* node)
 }
 
 static bool erase_entry(struct exfat* ef, struct exfat_node* node)