fs: add use of dirty flag for inodes/blocks