NTFS_COMMIT_WRITE

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

ntfs_commit_write - commit the received data  

SYNOPSIS

"SYNOPSIS"

int ntfs_commit_write (struct file * file, struct page * page, unsigned from, unsigned to);  

ARGUMENTS

file
-- undescribed --
page
-- undescribed --
from
-- undescribed --
to
-- undescribed --
 

DESCRIPTION

This is called from generic_file_write with i_sem held on the inode (page->mapping->host). The page is locked and kmapped so page_address can simply be used. The source data has already been copied into the page.

Need to mark modified blocks dirty so they get written out later when ntfs_writepage is invoked by the VM.

Return 0 on success or -errno on error.

Should be using generic_commit_write. This marks buffers uptodate and dirty, sets the page uptodate if all buffers in the page are uptodate, and updates i_size if the end of io is beyond i_size. In that case, it also marks the inode dirty. - We could still use this (obviously except for NInoMstProtected attributes, where we will need to duplicate the core code because we need our own async_io completion handler) but we could just do the i_size update in prepare write, when we resize the attribute. Then we would avoid the i_size update and mark_inode_dirty happening here.

Can't use generic_commit_write due to ntfs specialities but can look at it for implementation guidance.

If things have gone as outlined in ntfs_prepare_write, then we do not need to do any page content modifications here at all, except in the write to resident attribute case, where we need to do the uptodate bringing here which we combine with the copying into the mft record which means we only need to map the mft record and find the attribute record in it only once.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 06:21:01 GMT, October 06, 2005