ext2fs_clear_generic_bitmap@Base 1.41.0
ext2fs_clear_generic_bmap@Base 1.41.99
ext2fs_clear_inode_bitmap@Base 1.37
+ ext2fs_close2@Base 1.41.99
ext2fs_close@Base 1.37
ext2fs_close_inode_scan@Base 1.37
ext2fs_compare_block_bitmap@Base 1.37
ext2fs_file_set_size@Base 1.37
ext2fs_file_write@Base 1.37
ext2fs_find_block_device@Base 1.37
+ ext2fs_flush2@Base 1.41.99
ext2fs_flush@Base 1.37
ext2fs_flush_icache@Base 1.37
ext2fs_follow_link@Base 1.37
errcode_t ext2fs_flush(ext2_filsys fs)
{
+ return ext2fs_flush2(fs, 0);
+}
+
+errcode_t ext2fs_flush2(ext2_filsys fs, int flags)
+{
dgrp_t i;
errcode_t retval;
unsigned long fs_state;
ext2fs_swap_super(super_shadow);
#endif
- retval = io_channel_flush(fs->io);
+ if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC))
+ retval = io_channel_flush(fs->io);
retval = write_primary_superblock(fs, super_shadow);
if (retval)
goto errout;
fs->flags &= ~EXT2_FLAG_DIRTY;
- retval = io_channel_flush(fs->io);
+ if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC))
+ retval = io_channel_flush(fs->io);
errout:
fs->super->s_state = fs_state;
#ifdef WORDS_BIGENDIAN
errcode_t ext2fs_close(ext2_filsys fs)
{
+ return ext2fs_close2(fs, 0);
+}
+
+errcode_t ext2fs_close2(ext2_filsys fs, int flags)
+{
errcode_t retval;
int meta_blks;
io_stats stats = 0;
fs->flags |= EXT2_FLAG_SUPER_ONLY | EXT2_FLAG_DIRTY;
}
if (fs->flags & EXT2_FLAG_DIRTY) {
- retval = ext2fs_flush(fs);
+ retval = ext2fs_flush2(fs, flags);
if (retval)
return retval;
}
#endif
/*
+ * For ext2fs_close2() and ext2fs_flush2(), this flag allows you to
+ * avoid the fsync call.
+ */
+#define EXT2_FLAG_FLUSH_NO_SYNC 1
+
+/*
* function prototypes
*/
/* closefs.c */
extern errcode_t ext2fs_close(ext2_filsys fs);
+extern errcode_t ext2fs_close2(ext2_filsys fs, int flags);
extern errcode_t ext2fs_flush(ext2_filsys fs);
+extern errcode_t ext2fs_flush2(ext2_filsys fs, int flags);
extern int ext2fs_bg_has_super(ext2_filsys fs, int group_block);
extern errcode_t ext2fs_super_and_bgd_loc2(ext2_filsys fs,
dgrp_t group,