On Thu 05-03-15 12:47:30, Boaz Harrosh wrote: > On 03/05/2015 12:35 PM, Jan Kara wrote: > > On Thu 05-03-15 11:32:25, Boaz Harrosh wrote: > >> On 03/05/2015 11:24 AM, Boaz Harrosh wrote: > <> > >> > >> Just as curiosity, does the freezing code goes and turns all mappings > >> into read-only, Also for pfn mapping? > > Hum, that's a good question. Probably we don't end up doing that. For > > > > normal filesystems we sync all inodes which also writeprotects all pages > > (in clear_page_dirty_for_io() - for normal filesystems we know that if page > > is writeably mapped it is dirty). However this won't happen for pfn > > mapping as we don't have dirty pages. So we probably need dax_freeze() > > implementation that will walk through all inodes with writeable mappings and > > writeprotect them. > > > > I'll go head and try my shot on implementing a dax_freeze(). But I will > please need help with where to call it from. > > Probably something like: > if (IS_DAX(inode)) > dax_freeze(inode); > else > sync(inode) We normally call sync_filesystem() from fs/superblock:freeze_super(). For DAX filesystems we'd also need to call the special function after that. Maybe dax_freeze() isn't the best name. It could be called something like dax_writeprotect(sb) or something like that. Honza -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html