NTFS_PREPARE_WRITE

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

 

NAME

ntfs_prepare_write - prepare a page for receiving data  

SYNOPSIS

"SYNOPSIS"

int ntfs_prepare_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 but not kmapped. The source data has not yet been copied into the page.

Need to extend the attribute/fill in holes if necessary, create blocks and make partially overwritten blocks uptodate,

i_size is not to be modified yet.

Return 0 on success or -errno on error.

Should be using block_prepare_write [support for sparse files] or cont_prepare_write [no support for sparse files]. Cannot do that due to ntfs specifics but can look at them for implementation guidance.  

NOTE

In the range, from is inclusive and to is exclusive, i.e. from is the first byte in the page that will be written to and to is the first byte after the last byte that will be written to.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
NOTE

This document was created by man2html, using the manual pages.
Time: 00:02:34 GMT, October 09, 2005