aops.c: * aops.c - NTFS kernel address space operations and page cache handling.
aops.c: *	    Part of the Linux-NTFS project.
aops.c: * along with this program (in the main directory of the Linux-NTFS
aops.c:#include "ntfs.h"
aops.c: * ntfs_end_buffer_async_read - async io completion for reading attributes
aops.c: * a little bit by setting the index_block_size in ntfs_inode to the ntfs
aops.c: * record size, and index_block_size_bits, to the log(base 2) of the ntfs
aops.c:static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
aops.c:	ntfs_inode *ni;
aops.c:	ni = NTFS_I(page->mapping->host);
aops.c:		ntfs_error(ni->vol->sb, "Buffer I/O error, logical block %llu.",
aops.c:			if (likely(!post_read_mst_fixup((NTFS_RECORD*)(addr +
aops.c:			ntfs_error(ni->vol->sb, "post_read_mst_fixup() failed, "
aops.c:				ntfs_error(ni->vol->sb, "Setting page error, "
aops.c: * ntfs_read_block - fill a @page of an address space with data
aops.c: * completion handler ntfs_end_buffer_read_async(), if required, automatically
aops.c:static int ntfs_read_block(struct page *page)
aops.c:	ntfs_inode *ni;
aops.c:	ntfs_volume *vol;
aops.c:	ni = NTFS_I(page->mapping->host);
aops.c:		panic("NTFS: $MFT/$DATA run list has been unmapped! This is a "
aops.c:			ntfs_error(vol->sb, "vcn_to_lcn(vcn = 0x%llx) failed "
aops.c:			tbh->b_end_io = ntfs_end_buffer_async_read;
aops.c:				ntfs_end_buffer_async_read(tbh, 1);
aops.c: * ntfs_readpage - fill a @page of a @file with data from the device
aops.c: * For non-resident attributes, ntfs_readpage() fills the @page of the open
aops.c: * file @file by calling the ntfs version of the generic block_read_full_page()
aops.c: * function, ntfs_read_block(), which in turn creates and reads in the buffers
aops.c: * For resident attributes, OTOH, ntfs_readpage() fills @page by copying the
aops.c:int ntfs_readpage(struct file *file, struct page *page)
aops.c:	ntfs_inode *ni, *base_ni;
aops.c:	 * ntfs_writepage() of MstProtected() attributes.
aops.c:	ni = NTFS_I(page->mapping->host);
aops.c:				return ntfs_read_compressed_block(page);
aops.c:		return ntfs_read_block(page);
aops.c:		base_ni = ni->ext.base_ntfs_ino;
aops.c:#ifdef NTFS_RW
aops.c: * ntfs_write_block - write a @page to the backing store
aops.c: * Based on ntfs_read_block() and __block_write_full_page().
aops.c:static int ntfs_write_block(struct writeback_control *wbc, struct page *page)
aops.c:	ntfs_inode *ni;
aops.c:	ntfs_volume *vol;
aops.c:	ni = NTFS_I(vi);
aops.c:	ntfs_debug("Entering for inode %li, attribute type 0x%x, page index "
aops.c:		ntfs_warning(vol->sb, "Error allocating page buffers. "
aops.c:	/* NOTE: Different naming scheme to ntfs_read_block()! */
aops.c:			 * were zeroed by ntfs_writepage().
aops.c:			 * ntfs_writepage() has not done any clearing because
aops.c:			 * and the current page. Just use ntfs_readpage() to do
aops.c:			ntfs_error(vol->sb, "Writing beyond initialized size "
aops.c:			ntfs_error(vol->sb, "Writing into sparse regions is "
aops.c:		ntfs_error(vol->sb, "vcn_to_lcn(vcn = 0x%llx) failed "
aops.c:			ntfs_warning(vol->sb, "Error allocating memory. "
aops.c:	ntfs_debug("Done.");
aops.c: * ntfs_writepage - write a @page to the backing store
aops.c: * For non-resident attributes, ntfs_writepage() writes the @page by calling
aops.c: * the ntfs version of the generic block_write_full_page() function,
aops.c: * ntfs_write_block(), which in turn if necessary creates and writes the
aops.c: * For resident attributes, OTOH, ntfs_writepage() writes the @page by copying
aops.c: * Note the caller clears the page dirty flag before calling ntfs_writepage().
aops.c: * Based on ntfs_readpage() and fs/buffer.c::block_write_full_page().
aops.c:static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
aops.c:	ntfs_inode *ni, *base_ni;
aops.c:		ntfs_debug("Write outside i_size - truncated?");
aops.c:	ni = NTFS_I(vi);
aops.c:				ntfs_debug("Denying write access to encrypted "
aops.c:				// return ntfs_write_compressed_block(page);
aops.c:				ntfs_error(vi->i_sb, "Writing to compressed "
aops.c:				ntfs_error(vi->i_sb, "Writing to sparse files "
aops.c:			ntfs_error(vi->i_sb, "Writing to MST protected "
aops.c:		return ntfs_write_block(wbc, page);
aops.c:		base_ni = ni->ext.base_ntfs_ino;
aops.c:		ntfs_error(vi->i_sb, "BUG()! i_size (0x%llx) doesn't match "
aops.c:		ntfs_error(vi->i_sb, "BUG()! attr_pos (0x%llx) > attr_len "
aops.c:	 * zeroing happens on each ntfs_writepage() invocation.
aops.c:	flush_dcache_mft_record_page(ctx->ntfs_ino);
aops.c:	ntfs_error(vi->i_sb, "Writing to resident files is not supported yet. "
aops.c:		ntfs_warning(vi->i_sb, "Error allocating memory. Redirtying "
aops.c:		ntfs_error(vi->i_sb, "Resident attribute write failed with "
aops.c: * ntfs_prepare_nonresident_write -
aops.c:static int ntfs_prepare_nonresident_write(struct page *page,
aops.c:	ntfs_inode *ni;
aops.c:	ntfs_volume *vol;
aops.c:	ni = NTFS_I(vi);
aops.c:	ntfs_debug("Entering for inode %li, attribute type 0x%x, page index "
aops.c:			ntfs_error(vol->sb, "Writing beyond allocated size "
aops.c:			 * and the current page. Just use ntfs_readpage() to do
aops.c:			ntfs_error(vol->sb, "Writing beyond initialized size "
aops.c:					ntfs_error(vol->sb, "Writing into "
aops.c:				ntfs_error(vol->sb, "vcn_to_lcn(vcn = 0x%llx) "
aops.c:	ntfs_debug("Done.");
aops.c: * ntfs_prepare_write - prepare a page for receiving data
aops.c: * ntfs specifics but can look at them for implementation guidancea.
aops.c:static int ntfs_prepare_write(struct file *file, struct page *page,
aops.c:	ntfs_inode   *ni = NTFS_I(vi);
aops.c:	ntfs_debug("Entering for inode %li, attribute type 0x%x, page index "
aops.c:				ntfs_debug("Denying write access to encrypted "
aops.c:				// return ntfs_write_compressed_block(page);
aops.c:				ntfs_error(vi->i_sb, "Writing to compressed "
aops.c:				ntfs_error(vi->i_sb, "Writing to sparse files "
aops.c:			ntfs_error(vi->i_sb, "Writing to MST protected "
aops.c:		return ntfs_prepare_nonresident_write(page, from, to);
aops.c:		ntfs_error(vi->i_sb, "Writing beyond the existing file size is "
aops.c:	 * region written to to ntfs_commit_write(). The reason for doing this
aops.c:	ntfs_debug("Done.");
aops.c: * ntfs_commit_nonresident_write -
aops.c:static int ntfs_commit_nonresident_write(struct page *page,
aops.c:	ntfs_debug("Entering for inode %li, attribute type 0x%x, page index "
aops.c:			NTFS_I(vi)->type, page->index, from, to);
aops.c:	// For now, we know ntfs_prepare_write() would have failed so we can't
aops.c:	 * now we know ntfs_prepare_write() would have failed in the write
aops.c:		ntfs_error(vi->i_sb, "Writing beyond the existing file size is "
aops.c:	ntfs_debug("Done.");
aops.c: * ntfs_commit_write - commit the received data
aops.c: * ntfs_writepage() is invoked by the VM.
aops.c: * Can't use generic_commit_write() due to ntfs specialities but can look at
aops.c: * If things have gone as outlined in ntfs_prepare_write(), then we do not
aops.c:static int ntfs_commit_write(struct file *file, struct page *page,
aops.c:	ntfs_inode *ni, *base_ni;
aops.c:	ni = NTFS_I(vi);
aops.c:	ntfs_debug("Entering for inode %li, attribute type 0x%x, page index "
aops.c:				ntfs_debug("Denying write access to encrypted "
aops.c:				// return ntfs_write_compressed_block(page);
aops.c:				ntfs_error(vi->i_sb, "Writing to compressed "
aops.c:				ntfs_error(vi->i_sb, "Writing to sparse files "
aops.c:			ntfs_error(vi->i_sb, "Writing to MST protected "
aops.c:		return ntfs_commit_nonresident_write(page, from, to);
aops.c:		ntfs_error(vi->i_sb, "Writing beyond the existing file size is "
aops.c:		base_ni = ni->ext.base_ntfs_ino;
aops.c:		ntfs_error(vi->i_sb, "BUG()! i_size (0x%llx) doesn't match "
aops.c:		ntfs_error(vi->i_sb, "BUG()! attr_pos (0x%llx) > attr_len "
aops.c:	flush_dcache_mft_record_page(ctx->ntfs_ino);
aops.c:	ntfs_error(vi->i_sb, "Writing to resident files is not supported yet. "
aops.c:	ntfs_debug("Done.");
aops.c:		ntfs_warning(vi->i_sb, "Error allocating memory required to "
aops.c:			ntfs_warning(vi->i_sb, "Page is uptodate, setting "
aops.c:			ntfs_error(vi->i_sb, "Page is not uptodate. Written "
aops.c:		ntfs_error(vi->i_sb, "Resident attribute write failed with "
aops.c:#endif	/* NTFS_RW */
aops.c: * ntfs_aops - general address space operations for inodes and attributes
aops.c:struct address_space_operations ntfs_aops = {
aops.c:	.readpage	= ntfs_readpage,	/* Fill page with data. */
aops.c:#ifdef NTFS_RW
aops.c:	.writepage	= ntfs_writepage,	/* Write dirty page to disk. */
aops.c:	.prepare_write	= ntfs_prepare_write,	/* Prepare page and buffers
aops.c:	.commit_write	= ntfs_commit_write,	/* Commit received data. */
Binary file aops.o matches
attrib.c: * attrib.c - NTFS attribute operations. Part of the Linux-NTFS project.
attrib.c: * along with this program (in the main directory of the Linux-NTFS
attrib.c:#include "ntfs.h"
attrib.c: * ntfs_rl_mm - run_list memmove
attrib.c:static inline void ntfs_rl_mm(run_list_element *base, int dst, int src,
attrib.c: * ntfs_rl_mc - run_list memory copy
attrib.c:static inline void ntfs_rl_mc(run_list_element *dstbase, int dst,
attrib.c: * ntfs_rl_realloc - Reallocate memory for run_lists
attrib.c:static inline run_list_element *ntfs_rl_realloc(run_list_element *rl,
attrib.c:	new_rl = ntfs_malloc_nofs(new_size);
attrib.c:		ntfs_free(rl);
attrib.c: * ntfs_are_rl_mergeable - test if two run lists can be joined together
attrib.c:static inline BOOL ntfs_are_rl_mergeable(run_list_element *dst,
attrib.c: * __ntfs_rl_merge - merge two run lists without testing if they can be merged
attrib.c:static inline void __ntfs_rl_merge(run_list_element *dst, run_list_element *src)
attrib.c: * ntfs_rl_merge - test if two run lists can be joined together and merge them
attrib.c:static inline BOOL ntfs_rl_merge(run_list_element *dst, run_list_element *src)
attrib.c:	BOOL merge = ntfs_are_rl_mergeable(dst, src);
attrib.c:		__ntfs_rl_merge(dst, src);
attrib.c: * ntfs_rl_append - append a run list after a given element
attrib.c:static inline run_list_element *ntfs_rl_append(run_list_element *dst,
attrib.c:	right = ntfs_are_rl_mergeable(src + ssize - 1, dst + loc + 1);
attrib.c:	dst = ntfs_rl_realloc(dst, dsize, dsize + ssize - right);
attrib.c:		__ntfs_rl_merge(src + ssize - 1, dst + loc + 1);
attrib.c:	ntfs_rl_mm(dst, magic + 1, loc + 1 + right, dsize - loc - 1 - right);
attrib.c:	ntfs_rl_mc(dst, loc + 1, src, 0, ssize);
attrib.c: * ntfs_rl_insert - insert a run list into another
attrib.c:static inline run_list_element *ntfs_rl_insert(run_list_element *dst,
attrib.c:		left = ntfs_are_rl_mergeable(dst + loc - 1, src);
attrib.c:	dst = ntfs_rl_realloc(dst, dsize, dsize + ssize - left + disc - hole);
attrib.c:		__ntfs_rl_merge(dst + loc - 1, src);
attrib.c:	ntfs_rl_mm(dst, magic, loc, dsize - loc);
attrib.c:	ntfs_rl_mc(dst, loc + disc - hole, src, left, ssize - left);
attrib.c: * ntfs_rl_replace - overwrite a run_list element with another run list
attrib.c:static inline run_list_element *ntfs_rl_replace(run_list_element *dst,
attrib.c:	right = ntfs_are_rl_mergeable(src + ssize - 1, dst + loc + 1);
attrib.c:		left = ntfs_are_rl_mergeable(dst + loc - 1, src);
attrib.c:	dst = ntfs_rl_realloc(dst, dsize, dsize + ssize - left - right);
attrib.c:		__ntfs_rl_merge(src + ssize - 1, dst + loc + 1);
attrib.c:		__ntfs_rl_merge(dst + loc - 1, src);
attrib.c:	ntfs_rl_mm(dst, magic, loc + right + 1, dsize - loc - right - 1);
attrib.c:	ntfs_rl_mc(dst, loc, src, left, ssize - left);
attrib.c: * ntfs_rl_split - insert a run list into the centre of a hole
attrib.c:static inline run_list_element *ntfs_rl_split(run_list_element *dst, int dsize,
attrib.c:	dst = ntfs_rl_realloc(dst, dsize, dsize + ssize + 1);
attrib.c:	ntfs_rl_mm(dst, loc + 1 + ssize, loc, dsize - loc);
attrib.c:	ntfs_rl_mc(dst, loc + 1, src, 0, ssize);
attrib.c: * ntfs_merge_run_lists - merge two run_lists into one
attrib.c:run_list_element *ntfs_merge_run_lists(run_list_element *drl,
attrib.c:	ntfs_debug("dst:");
attrib.c:	ntfs_debug_dump_runlist(drl);
attrib.c:	ntfs_debug("src:");
attrib.c:	ntfs_debug_dump_runlist(srl);
attrib.c:			drl = ntfs_rl_realloc(drl, dend, dend + 1);
attrib.c:			ntfs_rl_mm(drl, 1, 0, dend);
attrib.c:		ntfs_error(NULL, "Run lists overlap. Cannot merge!");
attrib.c:	ntfs_debug("dfinal = %i, dend = %i", dfinal, dend);
attrib.c:	ntfs_debug("sstart = %i, sfinal = %i, send = %i", sstart, sfinal, send);
attrib.c:	ntfs_debug("start = %i, finish = %i", start, finish);
attrib.c:	ntfs_debug("ds = %i, ss = %i, dins = %i", ds, ss, dins);
attrib.c:			drl = ntfs_rl_replace(drl, ds, srl + sstart, ss, dins);
attrib.c:			drl = ntfs_rl_insert(drl, ds, srl + sstart, ss, dins);
attrib.c:			drl = ntfs_rl_append(drl, ds, srl + sstart, ss, dins);
attrib.c:			drl = ntfs_rl_split(drl, ds, srl + sstart, ss, dins);
attrib.c:		ntfs_error(NULL, "Merge failed.");
attrib.c:	ntfs_free(srl);
attrib.c:		ntfs_debug("Triggering marker code.");
attrib.c:				ntfs_debug("Old marker = 0x%llx, replacing "
attrib.c:					drl = ntfs_rl_realloc(drl, ds, ds + 2);
attrib.c:				drl = ntfs_rl_realloc(drl, ds, ds + 1);
attrib.c:	ntfs_debug("Merged run list:");
attrib.c:	ntfs_debug_dump_runlist(drl);
attrib.c:	ntfs_error(NULL, "Critical error! Not enough memory.");
attrib.c:	panic("NTFS: Cannot continue.");
attrib.c: * @vol:	ntfs volume on which the attribute resides
attrib.c:run_list_element *decompress_mapping_pairs(const ntfs_volume *vol,
attrib.c:		ntfs_error(vol->sb, "Invalid arguments.");
attrib.c:		ntfs_error(vol->sb, "Corrupt attribute.");
attrib.c:	rl = ntfs_malloc_nofs(rlsize = PAGE_SIZE);
attrib.c:		 * not-mapped and terminator elements. ntfs_malloc_nofs()
attrib.c:			rl2 = ntfs_malloc_nofs(rlsize + (int)PAGE_SIZE);
attrib.c:				ntfs_free(rl);
attrib.c:			ntfs_free(rl);
attrib.c:		 * didn't make up the NTFS specs and Windows NT4 treats the run
attrib.c:			ntfs_error(vol->sb, "Missing length entry in mapping "
attrib.c:			ntfs_error(vol->sb, "Invalid length in mapping pairs "
attrib.c:		 * sparse clusters on NTFS 3.0+, in which case we set the lcn
attrib.c:			 * On NTFS 1.2-, apparently can have lcn == -1 to
attrib.c:					ntfs_error(vol->sb, "lcn delta == -1");
attrib.c:					ntfs_error(vol->sb, "lcn == -1");
attrib.c:				ntfs_error(vol->sb, "Invalid LCN < -1 in "
attrib.c:		ntfs_error(vol->sb, "Corrupt mapping pairs array in "
attrib.c:			ntfs_debug("More extents to follow; deltaxcn = 0x%llx, "
attrib.c:			ntfs_error(vol->sb, "Corrupt attribute. deltaxcn = "
attrib.c:		ntfs_debug("Mapping pairs array successfully decompressed:");
attrib.c:		ntfs_debug_dump_runlist(rl);
attrib.c:	old_rl = ntfs_merge_run_lists(old_rl, rl);
attrib.c:	ntfs_free(rl);
attrib.c:	ntfs_error(vol->sb, "Failed to merge run lists.");
attrib.c:	ntfs_error(vol->sb, "Corrupt attribute.");
attrib.c:	ntfs_free(rl);
attrib.c: * map_run_list - map (a part of) a run list of an ntfs inode
attrib.c: * @ni:		ntfs inode for which to map (part of) a run list
attrib.c: * Map the part of a run list containing the @vcn of an the ntfs inode @ni.
attrib.c:int map_run_list(ntfs_inode *ni, VCN vcn)
attrib.c:	ntfs_inode *base_ni;
attrib.c:	ntfs_debug("Mapping run list part containing vcn 0x%llx.",
attrib.c:		base_ni = ni->ext.base_ntfs_ino;
attrib.c: * @ctx->ntfs_ino must be set to the ntfs inode to which the mft record
attrib.c: * @ctx->mrec belongs. This is so we can get at the ntfs volume and hence at
attrib.c:	ntfs_volume *vol;
attrib.c:		vol = ctx->ntfs_ino->vol;
attrib.c:		} else if (!ntfs_are_names_equal(name, name_len,
attrib.c:			rc = ntfs_collate_names(name, name_len,
attrib.c:			rc = ntfs_collate_names(name, name_len,
attrib.c:	ntfs_error(NULL, "Inode is corrupt. Run chkdsk.");
attrib.c: * @vol:		ntfs volume from which to read
attrib.c:int load_attribute_list(ntfs_volume *vol, run_list *run_list, u8 *al_start,
attrib.c:	ntfs_debug("Entering.");
attrib.c:		ntfs_debug("Reading vcn = 0x%llx, lcn = 0x%llx.",
attrib.c:			ntfs_error(sb, "vcn_to_lcn() failed. Cannot read "
attrib.c:		ntfs_debug("max_block = 0x%lx.", max_block);
attrib.c:			ntfs_debug("Reading block = 0x%lx.", block);
attrib.c:				ntfs_error(sb, "sb_bread() failed. Cannot "
attrib.c:	ntfs_error(sb, "Attribute list buffer overflow. Read attribute list "
attrib.c: * find_external_attr - find an attribute in the attribute list of an ntfs inode
attrib.c: * On first search @ctx->ntfs_ino must be the base mft record and @ctx must
attrib.c: * @ctx->ntfs_ino can be any extent inode, too (@ctx->base_ntfs_ino is then the
attrib.c: * being searched for in the base ntfs inode, i.e. if one wants to add the
attrib.c:	ntfs_inode *base_ni, *ni;
attrib.c:	ntfs_volume *vol;
attrib.c:	ni = ctx->ntfs_ino;
attrib.c:	base_ni = ctx->base_ntfs_ino;
attrib.c:	ntfs_debug("Entering for inode 0x%lx, type 0x%x.", ni->mft_no, type);
attrib.c:		base_ni = ctx->base_ntfs_ino = ctx->ntfs_ino;
attrib.c:		} else if (!ntfs_are_names_equal(al_name, al_name_len, name,
attrib.c:			rc = ntfs_collate_names(name, name_len, al_name,
attrib.c:			rc = ntfs_collate_names(name, name_len, al_name,
attrib.c:				ntfs_are_names_equal((uchar_t*)((u8*)
attrib.c:				ntfs_error(vol->sb, "Found stale mft "
attrib.c:				ni = ctx->ntfs_ino = base_ni;
attrib.c:				ctx->ntfs_ino = ni;
attrib.c:					ntfs_error(vol->sb, "Failed to map mft "
attrib.c:			if (!ntfs_are_names_equal((uchar_t*)((u8*)a +
attrib.c:			ntfs_debug("Done, found.");
attrib.c:	ntfs_error(base_ni->vol->sb, "Inode contains corrupt attribute list "
attrib.c:		ctx->ntfs_ino = base_ni;
attrib.c:	printk(KERN_CRIT "NTFS: FIXME: Hit unfinished error code path!!!\n");
attrib.c:	 * list inside NTFS_I(ctx->base_vfs_ino)->attr_list.
attrib.c:	ntfs_debug("Done, not found.");
attrib.c: * lookup_attr - find an attribute in an ntfs inode
attrib.c: * Find an attribute in an ntfs inode. On first search @ctx->ntfs_ino must
attrib.c:	ntfs_inode *base_ni;
attrib.c:	ntfs_debug("Entering.");
attrib.c:	if (ctx->base_ntfs_ino)
attrib.c:		base_ni = ctx->base_ntfs_ino;
attrib.c:		base_ni = ctx->ntfs_ino;
attrib.c: * @ni:		ntfs inode with which to initialize the search context
attrib.c:		ntfs_inode *ni, MFT_RECORD *mrec)
attrib.c:	ctx->ntfs_ino = ni;
attrib.c:	ctx->base_ntfs_ino = NULL;
attrib.c:	if (likely(!ctx->base_ntfs_ino)) {
attrib.c:	if (ctx->ntfs_ino != ctx->base_ntfs_ino)
attrib.c:		unmap_extent_mft_record(ctx->ntfs_ino);
attrib.c:	init_attr_search_ctx(ctx, ctx->base_ntfs_ino, ctx->base_mrec);
attrib.c: * @ni:		ntfs inode with which to initialize the search context
attrib.c:attr_search_context *get_attr_search_ctx(ntfs_inode *ni, MFT_RECORD *mrec)
attrib.c:	ctx = kmem_cache_alloc(ntfs_attr_ctx_cache, SLAB_NOFS);
attrib.c:	if (ctx->base_ntfs_ino && ctx->ntfs_ino != ctx->base_ntfs_ino)
attrib.c:		unmap_extent_mft_record(ctx->ntfs_ino);
attrib.c:	kmem_cache_free(ntfs_attr_ctx_cache, ctx);
attrib.h: * attrib.h - Defines for attribute handling in NTFS Linux kernel driver.
attrib.h: *	      Part of the Linux-NTFS project.
attrib.h: * along with this program (in the main directory of the Linux-NTFS 
attrib.h:#ifndef _LINUX_NTFS_ATTRIB_H
attrib.h:#define _LINUX_NTFS_ATTRIB_H
attrib.h:	ntfs_inode *ntfs_ino;
attrib.h:	ntfs_inode *base_ntfs_ino;
attrib.h:extern run_list_element *decompress_mapping_pairs(const ntfs_volume *vol,
attrib.h:extern int map_run_list(ntfs_inode *ni, VCN vcn);
attrib.h:extern int load_attribute_list(ntfs_volume *vol, run_list *rl, u8 *al_start,
attrib.h:extern attr_search_context *get_attr_search_ctx(ntfs_inode *ni,
attrib.h:#endif /* _LINUX_NTFS_ATTRIB_H */
Binary file attrib.o matches
Binary file built-in.o matches
ChangeLog:	- In between ntfs_prepare/commit_write, need exclusion between
ChangeLog:	  flag which we can set in ntfs_prepare_write() and clear again in
ChangeLog:	  ntfs_commit_write(). Just have to be careful in readpage/writepage,
ChangeLog:	  a data_size field in the ntfs_inode to store the real attribute
ChangeLog:	  ntfs_prepare_write. Basically, just be _very_ careful in this code...
ChangeLog:	  ntfs_readpage/writepage/truncate interoperate properly with us.
ChangeLog:	- Use get_bh() instead of manual atomic_inc() in fs/ntfs/compress.c.
ChangeLog:	- Modify fs/ntfs/time.c::ntfs2utc(), get_current_ntfs_time(), and
ChangeLog:	  utc2ntfs() to work with struct timespec instead of time_t on the
ChangeLog:	  Linux UTC time side thus preserving the full precision of the NTFS
ChangeLog:	- Move fs/ntfs/time.c to fs/ntfs/time.h and make the time functions
ChangeLog:	- Remove unused ntfs_dirty_inode().
ChangeLog:	- Cleanup super operations declaration in fs/ntfs/super.c.
ChangeLog:	- Wrap flush_dcache_mft_record_page() in #ifdef NTFS_RW.
ChangeLog:	  fs/ntfs/inode.h and use it to declare NInoTest{Set,Clear}Dirty.
ChangeLog:	- Move typedefs for ntfs_attr and test_t from fs/ntfs/inode.c to
ChangeLog:	  fs/ntfs/inode.h so they can be used elsewhere.
ChangeLog:	  and store it in ntfs_volume->mftmirr_size (fs/ntfs/super.c).
ChangeLog:	  not match (fs/ntfs/super.c).
ChangeLog:	  shutdown cleanly and force a read-only mount if not (fs/ntfs/super.c
ChangeLog:	  and fs/ntfs/logfile.c).  This is a little bit of a crude check in
ChangeLog:2.1.7 - Enable NFS exporting of mounted NTFS volumes.
ChangeLog:	- Set i_generation in the VFS inode from the seq_no of the NTFS inode.
ChangeLog:	- Make ntfs_lookup() NFS export safe, i.e. use d_splice_alias(), etc.
ChangeLog:	- Implement ->get_dentry() in fs/ntfs/namei.c::ntfs_get_dentry() as the
ChangeLog:	  default doesn't allow inode number 0 which is a valid inode on NTFS
ChangeLog:	  and even if it did allow that it uses iget() instead of ntfs_iget()
ChangeLog:	- Implement ->get_parent() in fs/ntfs/namei.c::ntfs_get_parent() as the
ChangeLog:	- Define export operations (->s_export_op) for NTFS (ntfs_export_ops)
ChangeLog:	  allows mounted NTFS volumes to be exported via NFS.
ChangeLog:	  fs/ntfs/aops.c::ntfs_commit_nonresident_write().
ChangeLog:	- Move a few assignments in fs/ntfs/attrib.c::load_attribute_list() to
ChangeLog:	- Update NTFS documentation ready for 2.6 kernel release.
ChangeLog:	- super.c::parse_ntfs_boot_sector(): Correct the check for 64-bit
ChangeLog:	  fs/ntfs/upcase.c. (Randy Dunlap <rddunlap@osdl.ord>)
ChangeLog:	  around calls to ->{prepare,commit}_write.  Adapt NTFS appropriately
ChangeLog:	  in fs/ntfs/aops.c::ntfs_prepare_nonresident_write() by using
ChangeLog:	- Initial implementation of fs/ntfs/aops.c::ntfs_writepage() and its
ChangeLog:	  helper fs/ntfs/aops.c::ntfs_write_block(). This enables mmap(2) based
ChangeLog:	  overwriting of existing files on ntfs. Note: Resident files are
ChangeLog:	- Initial implementation of fs/ntfs/aops.c::ntfs_prepare_write(), its
ChangeLog:	  helper fs/ntfs/aops.c::ntfs_prepare_nonresident_write() and their
ChangeLog:	  counterparts, fs/ntfs/aops.c::ntfs_commit_write(), and
ChangeLog:	  fs/ntfs/aops.c::ntfs_commit_nonresident_write(), respectively. Also,
ChangeLog:	  add generic_file_write() to the ntfs file operations (fs/ntfs/file.c).
ChangeLog:	  This enables write(2) based overwriting of existing files on ntfs.
ChangeLog:	- Implement ->truncate (fs/ntfs/inode.c::ntfs_truncate()) and
ChangeLog:	  ->setattr() (fs/ntfs/inode.c::ntfs_setattr()) inode operations for
ChangeLog:	  changes which we do not support yet. ntfs_truncate() actually only
ChangeLog:	  elsewhere means ntfs_truncate() never gets called for i_size changes.
ChangeLog:	  ntfs_prepare_{,nonresident_}write() in order to discard any
ChangeLog:	  fs/ntfs/aops.c::ntfs_read_block().
ChangeLog:	- If fs/ntfs/aops.c::ntfs_read_page() is called on an uptodate page,
ChangeLog:	- Add errors flag to the ntfs volume state, accessed via
ChangeLog:	- Clarify comment for ntfs file operation sendfile which was added by
ChangeLog:	  to say that ntfs ->sendfile is only used for the case where the
ChangeLog:	  source data is on the ntfs partition and the destination is
ChangeLog:	- Add generic_file_write() as our ntfs file write operation.
ChangeLog:	- Fix ntfs over loopback for compressed files by adding an
ChangeLog:	- Remove now unused function fs/ntfs/malloc.h::vmalloc_nofs().
ChangeLog:	- Fix ntfs_free() for ia64 and parisc by checking for VMALLOC_END, too.
ChangeLog:2.0.22 - Cleanups, mainly to ntfs_readdir(), and use C99 initializers.
ChangeLog:	- Change fs/ntfs/dir.c::ntfs_reddir() to only read/write ->f_pos once
ChangeLog:	- Remove unused variable blocks from fs/ntfs/aops.c::ntfs_read_block().
ChangeLog:	  unsigned long is 32-bits (fs/ntfs/super.c::parse_ntfs_boot_sector()).
ChangeLog:	  where unsigned long is 32-bits (fs/ntfs/file.c::ntfs_file_open() and
ChangeLog:	  fs/ntfs/dir.c::ntfs_dir_open()). This is the most we can do without
ChangeLog:	  having special fields for it inside the ntfs inode structure. This
ChangeLog:	- Simplify/cleanup error handling in fs/ntfs/dir.c::ntfs_readdir() and
ChangeLog:	- Add fs/ntfs/inode.c::ntfs_put_inode(), which we need to release the
ChangeLog:	- Apply block optimization added to fs/ntfs/aops.c::ntfs_read_block()
ChangeLog:	  to fs/ntfs/compress.c::ntfs_file_read_compressed_block() as well.
ChangeLog:	- Drop the "file" from ntfs_file_read_compressed_block().
ChangeLog:	- Rename fs/ntfs/aops.c::ntfs_enb_buffer_read_async() to
ChangeLog:	  ntfs_end_buffer_async_read() (more like the fs/buffer.c counterpart).
ChangeLog:	- Update ntfs_end_buffer_async_read() with the improved logic from
ChangeLog:	- Update submission of buffers in fs/ntfs/aops.c::ntfs_read_block() to
ChangeLog:	  uptodate and locking it in ntfs_file_read_compressed_block(). We now
ChangeLog:	- Modify fs/ntfs/inode.c::ntfs_read_locked_inode() to return an error
ChangeLog:	  code and update callers, i.e. ntfs_iget(), to pass that error code
ChangeLog:	- Optimize block resolution in fs/ntfs/aops.c::ntfs_read_block() to
ChangeLog:	  wrong inode in fs/ntfs/inode.c::ntfs_attr_iget().
ChangeLog:	- Fix debugging check in fs/ntfs/aops.c::ntfs_read_block().
ChangeLog:	- Fix silly bug in fs/ntfs/super.c::parse_options() which was causing
ChangeLog:	- Apply same macro magic used in fs/ntfs/inode.h to fs/ntfs/volume.h to
ChangeLog:	- Update fs/ntfs/attrib.c::map_run_list() to work on both real and
ChangeLog:	  - Add ntfs_attr_iget() and its helper ntfs_read_locked_attr_inode()
ChangeLog:	    to fs/ntfs/inode.c.
ChangeLog:	  - Add needed cleanup code to ntfs_clear_big_inode().
ChangeLog:	  now just have ntfs_aops:
ChangeLog:		end_buffer_read_attr_async() ->	ntfs_end_buffer_read_async(),
ChangeLog:		ntfs_attr_read_block()	     ->	ntfs_read_block(),
ChangeLog:		ntfs_file_read_page()	     ->	ntfs_readpage().
ChangeLog:	  - Rewrite fs/ntfs/aops.c::ntfs_readpage() to work on both real and
ChangeLog:	  - Remove obsolete fs/ntfs/aops.c::ntfs_mst_readpage().
ChangeLog:	- Change fs/ntfs/super.c::ntfs_statfs() to not rely on BKL by moving
ChangeLog:	  dropping the mftbmp_lock rw_semaphore in ntfs_statfs() itself.
ChangeLog:	- Bring attribute run list merging code (fs/ntfs/attrib.c) in sync with
ChangeLog:	  current userspace ntfs library code. This means that if a merge
ChangeLog:	  from ntfs_volume structure.
ChangeLog:	  from ntfs_volume structure.
ChangeLog:	  the call in fs/ntfs/inode.c::ntfs_iget() and update callers of iget()
ChangeLog:	  to use ntfs_iget(). Leave only one iget() call at mount time so we
ChangeLog:	  don't need an ntfs_iget_mount().
ChangeLog:	- Change fs/ntfs/inode.c::ntfs_new_extent_inode() to take mft_no as an
ChangeLog:	- Merge fs/ntfs/aops.c::end_buffer_read_mst_async() and
ChangeLog:	  fs/ntfs/aops.c::end_buffer_read_file_async() into one function
ChangeLog:	  fs/ntfs/aops.c::end_buffer_read_attr_async() using NInoMstProtected()
ChangeLog:	- Above change allows merging fs/ntfs/aops.c::ntfs_file_read_block()
ChangeLog:	  and fs/ntfs/aops.c::ntfs_mst_readpage() into one function
ChangeLog:	  fs/ntfs/aops.c::ntfs_attr_read_block(). Also, create a tiny wrapper
ChangeLog:	  fs/ntfs/aops.c::ntfs_mst_readpage() to transform the parameters from
ChangeLog:	  the VFS readpage function prototype to the ntfs_attr_read_block()
ChangeLog:	- Move definition of ntfs_inode_state_bits to fs/ntfs/inode.h and
ChangeLog:	- Add new flag to ntfs_inode_state_bits: NI_Sparse.
ChangeLog:	- Add new fields to ntfs_inode structure to allow use of fake inodes
ChangeLog:	- Rename fs/ntfs/inode.c::ntfs_{new,clear,destroy}_inode() to
ChangeLog:	  ntfs_{new,clear,destroy}_extent_inode() and update callers.
ChangeLog:	- Use ntfs_clear_extent_inode() in fs/ntfs/inode.c::__ntfs_clear_inode()
ChangeLog:	  instead of ntfs_destroy_extent_inode().
ChangeLog:	- Cleanup memory deallocations in {__,}ntfs_clear_{,big_}inode().
ChangeLog:	- Make all operations on ntfs inode state bits use the NIno* functions.
ChangeLog:	- Set up the new ntfs inode fields and state bits in
ChangeLog:	  fs/ntfs/inode.c::ntfs_read_inode() and add appropriate cleanup of
ChangeLog:	  allocated memory to __ntfs_clear_inode().
ChangeLog:	- Cleanup ntfs_inode structure a bit for better ordering of elements
ChangeLog:2.0.10 - There can only be 2^32 - 1 inodes on an NTFS volume.
ChangeLog:	  NTFS according to Microsoft.
ChangeLog:	- Change mft_no member of ntfs_inode structure to be unsigned long.
ChangeLog:	  Update all users. This makes ntfs_inode->mft_no just a copy of struct
ChangeLog:	- Change buffer size in ntfs_readdir()/ntfs_filldir() to use
ChangeLog:	- Remove unused source file fs/ntfs/attraops.c.
ChangeLog:	  to fs/ntfs/dir.c::ntfs_lookup_inode_by_name() and
ChangeLog:	  fs/ntfs/namei.c::ntfs_lookup():
ChangeLog:	  - Add additional argument to ntfs_lookup_inode_by_name() in which we
ChangeLog:	  - Change ntfs_lookup() to only create dcache entries for the correctly
ChangeLog:	- Fix potential 1 byte overflow in fs/ntfs/unistr.c::ntfs_ucstonls().
ChangeLog:	  in fs/ntfs/ntfs.h instead.
ChangeLog:	- Drop BKL from ntfs_readdir() after consultation with Al Viro. The
ChangeLog:	  no longer take the BKL in ntfs_readdir().
ChangeLog:	- No need to set old blocksize in super.c::ntfs_fill_super() as the
ChangeLog:	- BKL moved from VFS into dir.c::ntfs_readdir(). (Linus Torvalds)
ChangeLog:	  the directory ntfs_inode rw_semaphore mrec_lock. We mmight have to
ChangeLog:	- Add documentation on how to use the MD driver to be able to use NTFS
ChangeLog:	- Change compress.c::ntfs_file_read_compressed_block() to use
ChangeLog:	- Change super.c::ntfs_fill_super() to use bdev_hardsect_size() instead
ChangeLog:	- No need to get old blocksize in super.c::ntfs_fill_super() as
ChangeLog:	  ntfs_file_readpage().
ChangeLog:	  a mounted ntfs partition.
ChangeLog:	  mft.c::ntfs_mft_readpage(), aops.c::end_buffer_read_index_async(),
ChangeLog:	- Fix memory leak in ntfs_file_read_compressed_block() and generally
ChangeLog:	- Don't bother getting the run list in inode.c::ntfs_read_inode().
ChangeLog:	- Merge mft.c::ntfs_mft_readpage() and aops.c::ntfs_index_readpage()
ChangeLog:	  creating aops.c::ntfs_mst_readpage(), improving the handling of
ChangeLog:	  equivalent of ntfs_file_get_block() in ntfs_mst_readpage() itself.
ChangeLog:	- Use the host of the mftbmp address space mapping to hold the ntfs
ChangeLog:	- Change NTFS driver name to just NTFS and set version number to 2.0.0
ChangeLog:tng-0.0.8 - 08/03/2002 - Now using BitKeeper, http://linux-ntfs.bkbits.net/
ChangeLog:	  ntfs_debug().
ChangeLog:	- Apply kludge in ntfs_read_inode(), setting i_nlink to 1 for
ChangeLog:	- Convert to new file system declaration using ->ntfs_get_sb() and
ChangeLog:	  replacing ntfs_read_super() with ntfs_fill_super().
ChangeLog:	- Cleanup upcase loading code to use ntfs_(un)map_page().
ChangeLog:	- Replace device size determination in ntfs_fill_super() with
ChangeLog:	  types of inode names readdir() returns and modify ntfs_filldir()
ChangeLog:	  the ntfs inode structure and set them up in
ChangeLog:	  inode.c::ntfs_read_inode(). These reflect the unnamed data attribute
ChangeLog:	- Add copies of allocated_size and initialized_size to ntfs inode for
ChangeLog:	  inode.c::ntfs_read_inode().
ChangeLog:	- Add copies of allocated_size and initialized_size to ntfs volume for
ChangeLog:	- Parse deprecated ntfs driver options (iocharset, show_sys_files,
ChangeLog:	- Check for lowest_vcn != 0 in ntfs_read_inode() and mark the inode as
ChangeLog:		http://linux-ntfs.bkbits.net/ntfs-tng-2.5
ChangeLog:	  Documentation/filesystems/ntfs.txt for NTFS TNG.
ChangeLog:	- Update inode.c::ntfs_show_options() with show_inodes mount option.
ChangeLog:	- Make compress.c::ntfs_file_read_compressed_block() use map_run_list()
ChangeLog:	  data into one by setting the index_block_size{_bits} of the ntfs
ChangeLog:	  inode for $MFT to the mft_record_size{_bits} of the ntfs_volume.
ChangeLog:	- Make ntfs_file_get_block() use map_run_list() so all files now
ChangeLog:	- Make ntfs_dir_readpage() almost verbatim copy of
ChangeLog:	  block_read_full_page() by using ntfs_file_get_block() with only real
ChangeLog:	  ctx->ntfs_ino->vol->upcase{_len}. Update all callers.
ChangeLog:	  files do not have unnamed data attributes so ntfs_read_inode() had to
ChangeLog:	  function inode.c::ntfs_is_extended_system_file() which checks if any
ChangeLog:	  To enable them, one writes a non-zero value to /proc/sys/fs/ntfs-debug
ChangeLog:	  interface is enabled). Inspired by old ntfs driver.
ChangeLog:	  during ntfs initialization and is the only way to activate debugging
ChangeLog:	- Cleanup ntfs_lookup() and add consistency check of sequence numbers.
ChangeLog:	- Add index_vcn_size{_bits} to ntfs_inode structure to store the size
ChangeLog:	- Change ntfs_{debug,error,warning} to enable gcc to do type checking
ChangeLog:	  divorce of ntfs_inode from struct inode. To achieve this we have two
ChangeLog:	  separate slab caches, one for big ntfs inodes containing a struct
ChangeLog:	  inode and pure ntfs inodes and at the same time fix some faulty
ChangeLog:	  error code paths in ntfs_read_inode().
ChangeLog:	- Show mount options in proc (inode.c::ntfs_show_options()).
ChangeLog:	- Make ntfs_volume be allocated via kmalloc() instead of using a slab
ChangeLog:	  cache. There are too little ntfs_volume structures at any one time
ChangeLog:	- Use ntfs_map_page() in map_mft_record() and create ->readpage method
ChangeLog:	  for reading $MFT (ntfs_mft_readpage). In the process create dedicated
ChangeLog:	  address space operations (ntfs_mft_aops) for $MFT inode mapping. Also
ChangeLog:	- Fix a bug where kfree() was used insted of ntfs_free().
ChangeLog:	- Change map_mft_record() to take ntfs_inode as argument instead of
ChangeLog:	- Add pointer to ntfs_volume to ntfs_inode.
ChangeLog:	- Add mft record number and sequence number to ntfs_inode. Stop using
ChangeLog:	  i_generation to ntfs_inode to do this. Apply simplifications that
ChangeLog:	- Pass ntfs_inode everywhere in the driver (used to be struct inode).
ChangeLog:	- Add reference counting in ntfs_inode for the ntfs inode itself and
ChangeLog:	- Introduce ntfs_malloc_nofs() and ntfs_free() to allocate/free a single
ChangeLog:	  and also moved ntfs_debug() function into it.
ChangeLog:	- Use vsnprintf rather than vsprintf in the ntfs_error and ntfs_warning
ChangeLog:	- Moved the ntfs_inode and ntfs_volume (the former ntfs_inode_info and
ChangeLog:	  ntfs_sb_info) out of the common inode and super_block structures and
ChangeLog:	  makes ntfs entirely private with respect to the kernel tree.
ChangeLog:	- Added ntfs_lookup().
ChangeLog:	- Added ntfs_readdir().
ChangeLog:	NTFS file systems (i.e. ones without attribute lists in the system
compress.c: * compress.c - NTFS kernel compressed attributes handling.
compress.c: *		Part of the Linux-NTFS project.
compress.c: * along with this program (in the main directory of the Linux-NTFS
compress.c:#include "ntfs.h"
compress.c: * ntfs_compression_constants - enum of constants used in the compression code
compress.c:	NTFS_SYMBOL_TOKEN	=	0,
compress.c:	NTFS_PHRASE_TOKEN	=	1,
compress.c:	NTFS_TOKEN_MASK		=	1,
compress.c:	NTFS_SB_SIZE_MASK	=	0x0fff,
compress.c:	NTFS_SB_SIZE		=	0x1000,
compress.c:	NTFS_SB_IS_COMPRESSED	=	0x8000,
compress.c:	NTFS_MAX_CB_SIZE	= 64 * 1024,
compress.c:} ntfs_compression_constants;
compress.c: * ntfs_compression_buffer - one buffer for the decompression engine
compress.c:static u8 *ntfs_compression_buffer = NULL;
compress.c: * ntfs_cb_lock - spinlock which protects ntfs_compression_buffer
compress.c:static spinlock_t ntfs_cb_lock = SPIN_LOCK_UNLOCKED;
compress.c: * Caller has to hold the ntfs_lock semaphore.
compress.c:	BUG_ON(ntfs_compression_buffer);
compress.c:	ntfs_compression_buffer = vmalloc(NTFS_MAX_CB_SIZE);
compress.c:	if (!ntfs_compression_buffer)
compress.c: * Caller has to hold the ntfs_lock semaphore.
compress.c:	BUG_ON(!ntfs_compression_buffer);
compress.c:	vfree(ntfs_compression_buffer);
compress.c:	ntfs_compression_buffer = NULL;
compress.c:static void zero_partial_compressed_page(ntfs_inode *ni, struct page *page)
compress.c:	ntfs_debug("Zeroing page region outside initialized size.");
compress.c:static inline void handle_bounds_compressed_page(ntfs_inode *ni,
compress.c: * ntfs_decompress - decompress a compression block into an array of pages
compress.c: * The caller must have disabled preemption. ntfs_decompress() reenables it when
compress.c:static int ntfs_decompress(struct page *dest_pages[], int *dest_index,
compress.c:				   NTFS_SB_SIZE). */
compress.c:				   NTFS_SB_SIZE). */
compress.c:	ntfs_debug("Entering, cb_size = 0x%x.", cb_size);
compress.c:	ntfs_debug("Beginning sub-block at offset = 0x%x in the cb.",
compress.c:		ntfs_debug("Completed. Returning success (0).");
compress.c:		spin_unlock(&ntfs_cb_lock);
compress.c:			ntfs_inode *ni = NTFS_I(page->mapping->host);
compress.c:	do_sb_end = do_sb_start + NTFS_SB_SIZE;
compress.c:	cb_sb_end = cb_sb_start + (le16_to_cpup((u16*)cb) & NTFS_SB_SIZE_MASK)
compress.c:		*dest_ofs = (*dest_ofs + NTFS_SB_SIZE) & ~PAGE_CACHE_MASK;
compress.c:	if (!(le16_to_cpup((u16*)cb) & NTFS_SB_IS_COMPRESSED)) {
compress.c:		ntfs_debug("Found uncompressed sub-block.");
compress.c:		if (cb_sb_end - cb != NTFS_SB_SIZE)
compress.c:		memcpy(dp_addr, cb, NTFS_SB_SIZE);
compress.c:		cb += NTFS_SB_SIZE;
compress.c:		*dest_ofs += NTFS_SB_SIZE;
compress.c:	ntfs_debug("Found compressed sub-block.");
compress.c:	dp_sb_end = dp_sb_start + NTFS_SB_SIZE;
compress.c:			ntfs_debug("Filling incomplete sub-block with "
compress.c:		if ((tag & NTFS_TOKEN_MASK) == NTFS_SYMBOL_TOKEN) {
compress.c:	ntfs_error(NULL, "Failed. Returning -EOVERFLOW.\n");
compress.c: * ntfs_read_compressed_block - read a compressed block into the page cache
compress.c: * apparent if pages are above 8kiB and the NTFS volume only uses 512 byte
compress.c:int ntfs_read_compressed_block(struct page *page)
compress.c:	ntfs_inode *ni = NTFS_I(mapping->host);
compress.c:	ntfs_volume *vol = ni->vol;
compress.c:	ntfs_debug("Entering, page->index = 0x%lx, cb_size = 0x%x, nr_pages = "
compress.c:		ntfs_error(vol->sb, "Failed to allocate internal buffers.");
compress.c:		ntfs_debug("Reading vcn = 0x%llx, lcn = 0x%llx.",
compress.c:			ntfs_debug("block = 0x%x.", block);
compress.c:		 * mounted ntfs partition. This indicates either there is a
compress.c:			ntfs_warning(vol->sb, "Buffer is unlocked but not "
compress.c:			ntfs_warning(vol->sb, "Buffer is now uptodate. Good.");
compress.c:	spin_lock(&ntfs_cb_lock);
compress.c:	cb = ntfs_compression_buffer;
compress.c:	ntfs_debug("Successfully read the compression block.");
compress.c:		ntfs_debug("Found sparse compression block.");
compress.c:		spin_unlock(&ntfs_cb_lock);
compress.c:		ntfs_debug("Found uncompressed compression block.");
compress.c:		spin_unlock(&ntfs_cb_lock);
compress.c:		ntfs_debug("Found compressed compression block.");
compress.c:		err = ntfs_decompress(pages, &cur_page, &cur_ofs,
compress.c:		 * ntfs_decompress().
compress.c:			ntfs_error(vol->sb, "ntfs_decompress() failed in inode "
compress.c:			ntfs_error(vol->sb, "Still have pages left! "
compress.c:	ntfs_debug("Failed. Returning error code %s.", err == -EOVERFLOW ?
compress.c:	ntfs_error(vol->sb, "IO error while reading compressed data.");
compress.c:	ntfs_error(vol->sb, "map_run_list() failed. Cannot read compression "
compress.c:	ntfs_error(vol->sb, "vcn_to_lcn() failed. Cannot read compression "
compress.c:	ntfs_error(vol->sb, "getblk() failed. Cannot read compression block.");
Binary file compress.o matches
debug.c: * debug.c - NTFS kernel debug support. Part of the Linux-NTFS project.
debug.c: * along with this program (in the main directory of the Linux-NTFS 
debug.c: * __ntfs_warning - output a warning to the syslog
debug.c: * @sb:		super block of mounted ntfs filesystem
debug.c: * Outputs a warning to the syslog for the mounted ntfs filesystem described
debug.c: * @function is the name of the function from which __ntfs_warning is being
debug.c: * Note, you should be using debug.h::ntfs_warning(@sb, @fmt, @...) instead
debug.c:void __ntfs_warning(const char *function, const struct super_block *sb,
debug.c:		printk(KERN_ERR "NTFS-fs warning (device %s): %s(): %s\n",
debug.c:		printk(KERN_ERR "NTFS-fs warning: %s(): %s\n",
debug.c: * __ntfs_error - output an error to the syslog
debug.c: * @sb:		super block of mounted ntfs filesystem
debug.c: * Outputs an error to the syslog for the mounted ntfs filesystem described
debug.c: * @function is the name of the function from which __ntfs_error is being
debug.c: * Note, you should be using debug.h::ntfs_error(@sb, @fmt, @...) instead
debug.c:void __ntfs_error(const char *function, const struct super_block *sb,
debug.c:		printk(KERN_ERR "NTFS-fs error (device %s): %s(): %s\n",
debug.c:		printk(KERN_ERR "NTFS-fs error: %s(): %s\n",
debug.c:void __ntfs_debug (const char *file, int line, const char *function,
debug.c:	printk(KERN_DEBUG "NTFS-fs DEBUG (%s, %d): %s: %s\n",
debug.c:void ntfs_debug_dump_runlist(const run_list_element *rl)
debug.c:	printk(KERN_DEBUG "NTFS-fs DEBUG: Dumping run list (values "
debug.h: * debug.h - NTFS kernel debug support. Part of the Linux-NTFS project.
debug.h: * along with this program (in the main directory of the Linux-NTFS 
debug.h:#ifndef _LINUX_NTFS_DEBUG_H
debug.h:#define _LINUX_NTFS_DEBUG_H
debug.h: * ntfs_debug - write a debug level message to syslog
debug.h: * ntfs_debug() writes a DEBUG level message to the syslog but only if the
debug.h:static void ntfs_debug(const char *f, ...);
debug.h:extern void __ntfs_debug (const char *file, int line, const char *function,
debug.h:#define ntfs_debug(f, a...)						\
debug.h:	__ntfs_debug(__FILE__, __LINE__, __FUNCTION__, f, ##a)
debug.h:extern void ntfs_debug_dump_runlist(const run_list_element *rl);
debug.h:#define ntfs_debug(f, a...)		do {} while (0)
debug.h:#define ntfs_debug_dump_runlist(rl)	do {} while (0)
debug.h:extern void __ntfs_warning(const char *function, const struct super_block *sb,
debug.h:#define ntfs_warning(sb, f, a...)	__ntfs_warning(__FUNCTION__, sb, f, ##a)
debug.h:extern void __ntfs_error(const char *function, const struct super_block *sb,
debug.h:#define ntfs_error(sb, f, a...)		__ntfs_error(__FUNCTION__, sb, f, ##a)
debug.h:#endif /* _LINUX_NTFS_DEBUG_H */
Binary file debug.o matches
dir.c: * dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project.
dir.c: * along with this program (in the main directory of the Linux-NTFS
dir.c:#include "ntfs.h"
dir.c: * ntfs_lookup_inode_by_name - find an inode in a directory given its name
dir.c: * @dir_ni:	ntfs inode of the directory in which to search for the name
dir.c: * ntfs_lookup_inode_by_name() walks the contents of the directory looking for
dir.c: * ntfs_lookup() then uses this to find the long file name in the inode itself.
dir.c:MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const uchar_t *uname,
dir.c:		const int uname_len, ntfs_name **res)
dir.c:	ntfs_volume *vol = dir_ni->vol;
dir.c:	ntfs_name *name = NULL;
dir.c:		ntfs_error(sb, "map_mft_record() failed with error code %ld.",
dir.c:		ntfs_error(sb, "Index root attribute missing in directory "
dir.c:		if (ntfs_are_names_equal(uname, uname_len,
dir.c:			 * ntfs_lookup() can fix dcache aliasing issues.
dir.c:					name = kmalloc(sizeof(ntfs_name),
dir.c:		 * that the caller, ntfs_lookup(), can work on it. If the
dir.c:				ntfs_are_names_equal(uname, uname_len,
dir.c:			int name_size = sizeof(ntfs_name);
dir.c:				ntfs_error(sb, "Found already allocated name "
dir.c:						"linux-ntfs-dev@lists."
dir.c:		rc = ntfs_collate_names(uname, uname_len,
dir.c:		rc = ntfs_collate_names(uname, uname_len,
dir.c:		 * ntfs_are_names_equal() call will have gotten a match but we
dir.c:		ntfs_debug("Entry not found.");
dir.c:		ntfs_error(sb, "No index allocation attribute but index entry "
dir.c:	 * otherwise we deadlock with ntfs_map_page().
dir.c:	page = ntfs_map_page(ia_mapping, vcn <<
dir.c:		ntfs_error(sb, "Failed to map directory index page, error %ld.",
dir.c:		ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
dir.c:		ntfs_error(sb, "Actual VCN (0x%llx) of index buffer is "
dir.c:		ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode "
dir.c:		ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode "
dir.c:		ntfs_error(sb, "Size of index buffer (VCN 0x%llx) of directory "
dir.c:			ntfs_error(sb, "Index entry out of bounds in "
dir.c:		if (ntfs_are_names_equal(uname, uname_len,
dir.c:			 * ntfs_lookup() can fix dcache aliasing issues.
dir.c:					name = kmalloc(sizeof(ntfs_name),
dir.c:			ntfs_unmap_page(page);
dir.c:		 * that the caller, ntfs_lookup(), can work on it. If the
dir.c:				ntfs_are_names_equal(uname, uname_len,
dir.c:			int name_size = sizeof(ntfs_name);
dir.c:				ntfs_error(sb, "Found already allocated name "
dir.c:						"linux-ntfs-dev@lists."
dir.c:				ntfs_unmap_page(page);
dir.c:		rc = ntfs_collate_names(uname, uname_len,
dir.c:		rc = ntfs_collate_names(uname, uname_len,
dir.c:		 * ntfs_are_names_equal() call will have gotten a match but we
dir.c:			ntfs_error(sb, "Index entry with child node found in "
dir.c:			ntfs_unmap_page(page);
dir.c:		ntfs_error(sb, "Negative child node vcn in directory inode "
dir.c:		ntfs_unmap_page(page);
dir.c:	ntfs_debug("Entry not found.");
dir.c:	ntfs_unmap_page(page);
dir.c:	ntfs_error(sb, "Corrupt directory. Aborting lookup.");
dir.c: * ntfs_lookup_inode_by_name - find an inode in a directory given its name
dir.c: * @dir_ni:	ntfs inode of the directory in which to search for the name
dir.c: * ntfs_lookup_inode_by_name() walks the contents of the directory looking for
dir.c:u64 ntfs_lookup_inode_by_name(ntfs_inode *dir_ni, const uchar_t *uname,
dir.c:	ntfs_volume *vol = dir_ni->vol;
dir.c:		ntfs_error(sb, "map_mft_record() failed with error code %ld.",
dir.c:		ntfs_error(sb, "Index root attribute missing in directory "
dir.c:		if (ntfs_are_names_equal(uname, uname_len,
dir.c:		rc = ntfs_collate_names(uname, uname_len,
dir.c:		rc = ntfs_collate_names(uname, uname_len,
dir.c:		 * ntfs_are_names_equal() call will have gotten a match but we
dir.c:		ntfs_error(sb, "No index allocation attribute but index entry "
dir.c:	 * otherwise we deadlock with ntfs_map_page().
dir.c:	page = ntfs_map_page(ia_mapping, vcn <<
dir.c:		ntfs_error(sb, "Failed to map directory index page, error %ld.",
dir.c:		ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
dir.c:		ntfs_error(sb, "Actual VCN (0x%llx) of index buffer is "
dir.c:		ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode "
dir.c:		ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode "
dir.c:		ntfs_error(sb, "Size of index buffer (VCN 0x%llx) of directory "
dir.c:			ntfs_error(sb, "Index entry out of bounds in "
dir.c:		if (ntfs_are_names_equal(uname, uname_len,
dir.c:			ntfs_unmap_page(page);
dir.c:		rc = ntfs_collate_names(uname, uname_len,
dir.c:		rc = ntfs_collate_names(uname, uname_len,
dir.c:		 * ntfs_are_names_equal() call will have gotten a match but we
dir.c:			ntfs_error(sb, "Index entry with child node found in "
dir.c:			ntfs_unmap_page(page);
dir.c:		ntfs_error(sb, "Negative child node vcn in directory inode "
dir.c:	ntfs_debug("Entry not found.");
dir.c:	ntfs_unmap_page(page);
dir.c:	ntfs_error(sb, "Corrupt directory. Aborting lookup.");
dir.c: * ntfs_filldir - ntfs specific filldir method
dir.c: * @vol:	current ntfs volume
dir.c: * @ndir:	ntfs inode of current directory
dir.c:static inline int ntfs_filldir(ntfs_volume *vol, loff_t *fpos,
dir.c:		ntfs_inode *ndir, const INDEX_TYPE index_type,
dir.c:		ntfs_debug("Skipping DOS name space entry.");
dir.c:		ntfs_debug("Skipping root directory self reference entry.");
dir.c:		ntfs_debug("Skipping system file.");
dir.c:	name_len = ntfs_ucstonls(vol, (uchar_t*)&ie->key.file_name.file_name,
dir.c:			NTFS_MAX_NAME_LEN * NLS_MAX_CHARSET_SIZE + 1);
dir.c:		ntfs_debug("Skipping unrepresentable file.");
dir.c:	ntfs_debug("Calling filldir for %s with len %i, fpos 0x%llx, inode "
dir.c: * We use the same basic approach as the old NTFS driver, i.e. we parse the
dir.c:static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
dir.c:	ntfs_inode *ndir = NTFS_I(vdir);
dir.c:	ntfs_volume *vol = NTFS_SB(sb);
dir.c:	ntfs_debug("Entering for inode 0x%lx, fpos 0x%llx.",
dir.c:		ntfs_debug("Calling filldir for . with len 1, fpos 0x0, "
dir.c:		ntfs_debug("Calling filldir for .. with len 2, fpos 0x1, "
dir.c:	name = (u8*)kmalloc(NTFS_MAX_NAME_LEN * NLS_MAX_CHARSET_SIZE + 1,
dir.c:		ntfs_error(sb, "Index root attribute missing in directory "
dir.c:		ntfs_debug("In index root, offset 0x%x.", (u8*)ie - (u8*)ir);
dir.c:		rc = ntfs_filldir(vol, &fpos, ndir, INDEX_TYPE_ROOT, ir, ie,
dir.c:	 * We need to release it, otherwise we deadlock on ntfs_attr_iget()
dir.c:	 * and/or ntfs_read_page().
dir.c:		ntfs_debug("Inode %lu, regetting index bitmap.", vdir->i_ino);
dir.c:		bmp_vi = ntfs_attr_iget(vdir, AT_BITMAP, I30, 4);
dir.c:			ntfs_error(sb, "Failed to get bitmap attribute.");
dir.c:		ntfs_error(sb, "Current index allocation position exceeds "
dir.c:	ntfs_debug("Reading bitmap with page index 0x%llx, bit ofs 0x%llx",
dir.c:	bmp_page = ntfs_map_page(bmp_mapping,
dir.c:		ntfs_error(sb, "Reading index bitmap failed.");
dir.c:			ntfs_unmap_page(bmp_page);
dir.c:	ntfs_debug("Handling index buffer 0x%llx.",
dir.c:			ntfs_unmap_page(ia_page);
dir.c:		ia_page = ntfs_map_page(ia_mapping, ia_pos >> PAGE_CACHE_SHIFT);
dir.c:			ntfs_error(sb, "Reading index allocation data failed.");
dir.c:		ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
dir.c:		ntfs_error(sb, "Actual VCN (0x%llx) of index buffer is "
dir.c:		ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode "
dir.c:		ntfs_error(sb, "Index buffer (VCN 0x%llx) of directory inode "
dir.c:		ntfs_error(sb, "Size of index buffer (VCN 0x%llx) of directory "
dir.c:		ntfs_debug("In index allocation, offset 0x%llx.",
dir.c:		rc = ntfs_filldir(vol, &fpos, ndir, INDEX_TYPE_ALLOCATION, ia,
dir.c:			ntfs_unmap_page(ia_page);
dir.c:			ntfs_unmap_page(bmp_page);
dir.c:		ntfs_unmap_page(ia_page);
dir.c:	ntfs_unmap_page(bmp_page);
dir.c:		ntfs_debug("EOD, fpos 0x%llx, returning 0.", fpos);
dir.c:		ntfs_debug("filldir returned %i, fpos 0x%llx, returning 0.",
dir.c:		ntfs_unmap_page(bmp_page);
dir.c:		ntfs_unmap_page(ia_page);
dir.c:	ntfs_debug("Failed. Returning error code %i.", -err);
dir.c: * ntfs_dir_open - called when an inode is about to be opened
dir.c:static int ntfs_dir_open(struct inode *vi, struct file *filp)
dir.c:struct file_operations ntfs_dir_ops = {
dir.c:	.readdir	= ntfs_readdir,		/* Read directory contents. */
dir.c:	.open		= ntfs_dir_open,	/* Open directory. */
dir.h: * dir.h - Defines for directory handling in NTFS Linux kernel driver. Part of
dir.h: *	   the Linux-NTFS project.
dir.h: * along with this program (in the main directory of the Linux-NTFS 
dir.h:#ifndef _LINUX_NTFS_DIR_H
dir.h:#define _LINUX_NTFS_DIR_H
dir.h: * ntfs_name is used to return the file name to the caller of
dir.h: * ntfs_lookup_inode_by_name() in order for the caller (namei.c::ntfs_lookup())
dir.h:} __attribute__ ((__packed__)) ntfs_name;
dir.h:extern MFT_REF ntfs_lookup_inode_by_name(ntfs_inode *dir_ni,
dir.h:		const uchar_t *uname, const int uname_len, ntfs_name **res);
dir.h:#endif /* _LINUX_NTFS_FS_DIR_H */
Binary file dir.o matches
endian.h: * endian.h - Defines for endianness handling in NTFS Linux kernel driver.
endian.h: *	      Part of the Linux-NTFS project.
endian.h: * along with this program (in the main directory of the Linux-NTFS 
endian.h:#ifndef _LINUX_NTFS_ENDIAN_H
endian.h:#define _LINUX_NTFS_ENDIAN_H
endian.h:#endif /* _LINUX_NTFS_ENDIAN_H */
file.c: * file.c - NTFS kernel file operations. Part of the Linux-NTFS project.
file.c: * along with this program (in the main directory of the Linux-NTFS 
file.c:#include "ntfs.h"
file.c: * ntfs_file_open - called when an inode is about to be opened
file.c:static int ntfs_file_open(struct inode *vi, struct file *filp)
file.c:struct file_operations ntfs_file_ops = {
file.c:#ifdef NTFS_RW
file.c:						   ntfs partition. We don't
file.c:	.open		= ntfs_file_open,	/* Open file. */
file.c:struct inode_operations ntfs_file_inode_ops = {
file.c:#ifdef NTFS_RW
file.c:	.truncate	= ntfs_truncate,
file.c:	.setattr	= ntfs_setattr,
file.c:struct file_operations ntfs_empty_file_ops = {};
file.c:struct inode_operations ntfs_empty_inode_ops = {};
Binary file file.o matches
inode.c: * inode.c - NTFS kernel inode handling. Part of the Linux-NTFS project.
inode.c: * along with this program (in the main directory of the Linux-NTFS
inode.c:#include "ntfs.h"
inode.c: * ntfs_test_inode - compare two (possibly fake) inodes for equality
inode.c: * @na:		ntfs attribute which is being tested with
inode.c: * Compare the ntfs attribute embedded in the ntfs specific part of the vfs
inode.c: * inode @vi for equality with the ntfs attribute @na.
inode.c:int ntfs_test_inode(struct inode *vi, ntfs_attr *na)
inode.c:	ntfs_inode *ni;
inode.c:	ni = NTFS_I(vi);
inode.c: * ntfs_init_locked_inode - initialize an inode
inode.c: * @na:		ntfs attribute which to initialize @vi to
inode.c: * Initialize the vfs inode @vi with the values from the ntfs attribute @na in
inode.c: * order to enable ntfs_test_inode() to do its work.
inode.c: * ntfs_read_inode_locked() will fill them in later.
inode.c:static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
inode.c:	ntfs_inode *ni = NTFS_I(vi);
inode.c:static int ntfs_read_locked_inode(struct inode *vi);
inode.c:static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi);
inode.c: * ntfs_iget - obtain a struct inode corresponding to a specific normal inode
inode.c: * and finally ntfs_read_locked_inode() is called to read in the inode and
inode.c:struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no)
inode.c:	ntfs_attr na;
inode.c:	vi = iget5_locked(sb, mft_no, (test_t)ntfs_test_inode,
inode.c:			(set_t)ntfs_init_locked_inode, &na);
inode.c:		err = ntfs_read_locked_inode(vi);
inode.c: * ntfs_attr_iget - obtain a struct inode corresponding to an attribute
inode.c: * initialized, and finally ntfs_read_locked_attr_inode() is called to read the
inode.c:struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPES type,
inode.c:	ntfs_attr na;
inode.c:	vi = iget5_locked(base_vi->i_sb, na.mft_no, (test_t)ntfs_test_inode,
inode.c:			(set_t)ntfs_init_locked_inode, &na);
inode.c:		err = ntfs_read_locked_attr_inode(base_vi, vi);
inode.c:struct inode *ntfs_alloc_big_inode(struct super_block *sb)
inode.c:	ntfs_inode *ni;
inode.c:	ntfs_debug("Entering.");
inode.c:	ni = (ntfs_inode *)kmem_cache_alloc(ntfs_big_inode_cache,
inode.c:	ntfs_error(sb, "Allocation of NTFS big inode structure failed.");
inode.c:void ntfs_destroy_big_inode(struct inode *inode)
inode.c:	ntfs_inode *ni = NTFS_I(inode);
inode.c:	ntfs_debug("Entering.");
inode.c:	kmem_cache_free(ntfs_big_inode_cache, NTFS_I(inode));
inode.c:static inline ntfs_inode *ntfs_alloc_extent_inode(void)
inode.c:	ntfs_inode *ni;
inode.c:	ntfs_debug("Entering.");
inode.c:	ni = (ntfs_inode *)kmem_cache_alloc(ntfs_inode_cache, SLAB_NOFS);
inode.c:	ntfs_error(NULL, "Allocation of NTFS inode structure failed.");
inode.c:void ntfs_destroy_extent_inode(ntfs_inode *ni)
inode.c:	ntfs_debug("Entering.");
inode.c:	kmem_cache_free(ntfs_inode_cache, ni);
inode.c: * __ntfs_init_inode - initialize ntfs specific part of an inode
inode.c: * @ni:		freshly allocated ntfs inode which to initialize
inode.c: * Initialize an ntfs inode to defaults.
inode.c:static void __ntfs_init_inode(struct super_block *sb, ntfs_inode *ni)
inode.c:	ntfs_debug("Entering.");
inode.c:	ni->vol = NTFS_SB(sb);
inode.c:	ni->ext.base_ntfs_ino = NULL;
inode.c:static inline void ntfs_init_big_inode(struct inode *vi)
inode.c:	ntfs_inode *ni = NTFS_I(vi);
inode.c:	ntfs_debug("Entering.");
inode.c:	__ntfs_init_inode(vi->i_sb, ni);
inode.c:inline ntfs_inode *ntfs_new_extent_inode(struct super_block *sb,
inode.c:	ntfs_inode *ni = ntfs_alloc_extent_inode();
inode.c:	ntfs_debug("Entering.");
inode.c:		__ntfs_init_inode(sb, ni);
inode.c: * ntfs_is_extended_system_file - check if a file is in the $Extend directory
inode.c:static int ntfs_is_extended_system_file(attr_search_context *ctx)
inode.c:			ntfs_error(ctx->ntfs_ino->vol->sb, "Corrupt file name "
inode.c:			ntfs_error(ctx->ntfs_ino->vol->sb, "Non-resident file "
inode.c:			ntfs_error(ctx->ntfs_ino->vol->sb, "File name with "
inode.c:			ntfs_error(ctx->ntfs_ino->vol->sb, "Unindexed file "
inode.c:		ntfs_error(ctx->ntfs_ino->vol->sb, "Inode hard link count "
inode.c: * ntfs_read_locked_inode - read an inode from its device
inode.c: * ntfs_read_locked_inode() is called from ntfs_iget() to read the inode
inode.c: * ntfs_read_locked_inode() maps, pins and locks the mft record number i_ino
inode.c: * the ntfs inode.
inode.c: *    In any case ntfs_read_locked_inode() has nothing to do with i_flags.
inode.c:static int ntfs_read_locked_inode(struct inode *vi)
inode.c:	ntfs_volume *vol = NTFS_SB(vi->i_sb);
inode.c:	ntfs_inode *ni;
inode.c:	ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino);
inode.c:	 * Initialize the ntfs specific part of @vi special casing
inode.c:		ntfs_init_big_inode(vi);
inode.c:	ni = NTFS_I(vi);
inode.c:		ntfs_error(vi->i_sb, "Inode is not in use! You should "
inode.c:		ntfs_error(vi->i_sb, "Inode is an extent inode! You should "
inode.c:	/* Transfer information from mft record into vfs and ntfs inodes. */
inode.c:		ntfs_error(vi->i_sb, "$STANDARD_INFORMATION attribute is "
inode.c:	 * Note: The i_?times do not quite map perfectly onto the NTFS times,
inode.c:	vi->i_mtime = ntfs2utc(si->last_data_change_time);
inode.c:	vi->i_ctime = ntfs2utc(si->last_mft_change_time);
inode.c:	vi->i_atime = ntfs2utc(si->last_access_time);
inode.c:		ntfs_debug("Attribute list found in inode 0x%lx.", vi->i_ino);
inode.c:			ntfs_error(vi->i_sb, "Attribute list attribute is "
inode.c:		ni->attr_list = ntfs_malloc_nofs(ni->attr_list_size);
inode.c:			ntfs_error(vi->i_sb, "Not enough memory to allocate "
inode.c:				ntfs_error(vi->i_sb, "Attribute list has non "
inode.c:				ntfs_error(vi->i_sb, "Mapping pairs "
inode.c:				ntfs_error(vi->i_sb, "Failed to load "
inode.c:				ntfs_error(vi->i_sb, "Corrupt attribute list "
inode.c:	 * in ntfs_ino->attr_list and it is ntfs_ino->attr_list_size bytes.
inode.c:		ntfs_inode *bni;
inode.c:			ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is "
inode.c:			ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is "
inode.c:				ntfs_error(vi->i_sb, "Found encrypted and "
inode.c:			ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is "
inode.c:			ntfs_error(vi->i_sb, "Directory index is corrupt.");
inode.c:			ntfs_error(vi->i_sb, "Indexed attribute is not "
inode.c:			ntfs_error(vi->i_sb, "Index collation rule is not "
inode.c:			ntfs_error(vi->i_sb, "Index block size (%u) is not a "
inode.c:			ntfs_error(vi->i_sb, "Index block size (%u) > "
inode.c:		if (ni->itype.index.block_size < NTFS_BLOCK_SIZE) {
inode.c:			ntfs_error(vi->i_sb, "Index block size (%u) < "
inode.c:					"NTFS_BLOCK_SIZE (%i) is not "
inode.c:					NTFS_BLOCK_SIZE);
inode.c:			ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute "
inode.c:			ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute "
inode.c:			ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute "
inode.c:			ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute "
inode.c:			ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute "
inode.c:			ntfs_error(vi->i_sb, "First extent of "
inode.c:		 * we would deadlock in ntfs_attr_iget().
inode.c:		bvi = ntfs_attr_iget(vi, AT_BITMAP, I30, 4);
inode.c:			ntfs_error(vi->i_sb, "Failed to get bitmap attribute.");
inode.c:		bni = NTFS_I(bvi);
inode.c:			ntfs_error(vi->i_sb, "$BITMAP attribute is compressed "
inode.c:			ntfs_error(vi->i_sb, "Index bitmap too small (0x%llx) "
inode.c:		vi->i_op = &ntfs_dir_inode_ops;
inode.c:		vi->i_fop = &ntfs_dir_ops;
inode.c:		vi->i_mapping->a_ops = &ntfs_aops;
inode.c:			if (ntfs_is_extended_system_file(ctx) > 0)
inode.c:			ntfs_error(vi->i_sb, "$DATA attribute is "
inode.c:					ntfs_error(vi->i_sb, "Found "
inode.c:					ntfs_error(vi->i_sb, "Found "
inode.c:					ntfs_error(vi->i_sb, "Found "
inode.c:					ntfs_error(vi->i_sb, "Found encrypted "
inode.c:				ntfs_error(vi->i_sb, "First extent of $DATA "
inode.c:		vi->i_op = &ntfs_file_inode_ops;
inode.c:		vi->i_fop = &ntfs_file_ops;
inode.c:		vi->i_mapping->a_ops = &ntfs_aops;
inode.c:	ntfs_debug("Done.");
inode.c:	ntfs_error(vi->i_sb, "Failed with error code %i. Marking inode 0x%lx "
inode.c: * ntfs_read_locked_attr_inode - read an attribute inode from its base inode
inode.c: * ntfs_read_locked_attr_inode() is called from the ntfs_attr_iget() to read
inode.c: * ntfs_read_locked_attr_inode() maps, pins and locks the base inode for
inode.c: * necessary fields in @vi as well as initializing the ntfs inode.
inode.c:static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi)
inode.c:	ntfs_volume *vol = NTFS_SB(vi->i_sb);
inode.c:	ntfs_inode *ni, *base_ni;
inode.c:	ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino);
inode.c:	ntfs_init_big_inode(vi);
inode.c:	ni	= NTFS_I(vi);
inode.c:	base_ni = NTFS_I(base_vi);
inode.c:			ntfs_error(vi->i_sb, "Found mst protected attribute "
inode.c:					"to linux-ntfs-dev@lists."
inode.c:				ntfs_error(vi->i_sb, "Found mst protected "
inode.c:						"message to linux-ntfs-dev@"
inode.c:				ntfs_error(vi->i_sb, "Found compressed non-"
inode.c:						"linux-ntfs-dev@lists."
inode.c:				ntfs_error(vi->i_sb, "Found "
inode.c:				ntfs_error(vi->i_sb, "Found unknown "
inode.c:				ntfs_error(vi->i_sb, "Found "
inode.c:				ntfs_error(vi->i_sb, "Found encrypted "
inode.c:				ntfs_error(vi->i_sb, "Found mst protected "
inode.c:						"message to linux-ntfs-dev@"
inode.c:				ntfs_error(vi->i_sb, "Found mst protected "
inode.c:						"message to linux-ntfs-dev@"
inode.c:			ntfs_error(vi->i_sb, "First extent of attribute has "
inode.c:	vi->i_mapping->a_ops = &ntfs_aops;
inode.c:	ni->ext.base_ntfs_ino = base_ni;
inode.c:	ntfs_debug("Done.");
inode.c:	ntfs_error(vi->i_sb, "Failed with error code %i while reading "
inode.c: * ntfs_read_inode_mount - special read_inode for mount time use only
inode.c:void ntfs_read_inode_mount(struct inode *vi)
inode.c:	ntfs_volume *vol = NTFS_SB(sb);
inode.c:	ntfs_inode *ni;
inode.c:	ntfs_debug("Entering.");
inode.c:		ntfs_error(sb, "Called for inode 0x%lx but only inode %d "
inode.c:	/* Initialize the ntfs specific part of @vi. */
inode.c:	ntfs_init_big_inode(vi);
inode.c:	ni = NTFS_I(vi);
inode.c:		ntfs_error(sb, "Unsupported mft record size %i (max 64kiB).",
inode.c:	m = (MFT_RECORD*)ntfs_malloc_nofs(i);
inode.c:		ntfs_error(sb, "Failed to allocate buffer for $MFT record 0.");
inode.c:			ntfs_error(sb, "Device read failed.");
inode.c:	if (post_read_mst_fixup((NTFS_RECORD*)m, vol->mft_record_size)) {
inode.c:		ntfs_error(sb, "MST fixup failed. $MFT is corrupt.");
inode.c:	vi->i_mapping->a_ops = &ntfs_mft_aops;
inode.c:		ntfs_debug("Attribute list attribute found in $MFT.");
inode.c:			ntfs_error(sb, "Attribute list attribute is "
inode.c:		ni->attr_list = ntfs_malloc_nofs(ni->attr_list_size);
inode.c:			ntfs_error(sb, "Not enough memory to allocate buffer "
inode.c:				ntfs_error(sb, "Attribute list has non zero "
inode.c:				ntfs_error(sb, "Mapping pairs decompression "
inode.c:				ntfs_error(sb, "Failed to load attribute list "
inode.c:				ntfs_error(sb, "Corrupt attribute list "
inode.c:				ntfs_error(sb, "BUG: The first $DATA extent "
inode.c:						"linux-ntfs-dev@lists."
inode.c:			ntfs_error(sb, "$MFT must be non-resident but a "
inode.c:			ntfs_error(sb, "$MFT must be uncompressed, "
inode.c:			ntfs_error(sb, "decompress_mapping_pairs() failed with "
inode.c:				ntfs_error(sb, "First extent of $DATA "
inode.c:				ntfs_error(sb, "$MFT is too big! Aborting.");
inode.c:			 * the normal ntfs_read_inode() function. Thus, take
inode.c:			 * now because we need ntfs_read_inode() in place to
inode.c:			sb->s_op = &ntfs_sops;
inode.c:			 * ntfs_read_inode() at this point. We will need to
inode.c:			 * ntfs_read_inode() on extents of $MFT/$DATA. But lets
inode.c:			ntfs_read_locked_inode(vi);
inode.c:				ntfs_error(sb, "ntfs_read_inode() of $MFT "
inode.c:						"linux-ntfs-dev@lists."
inode.c:				sb->s_op = &ntfs_mount_sops;
inode.c:			 * ntfs_read_inode() will have set up the default ones.
inode.c:			vi->i_op = &ntfs_empty_inode_ops;
inode.c:			vi->i_fop = &ntfs_empty_file_ops;
inode.c:			vi->i_mapping->a_ops = &ntfs_mft_aops;
inode.c:			ntfs_error(sb, "$MFT has corrupt attribute list "
inode.c:		ntfs_error(sb, "$MFT/$DATA attribute not found. $MFT is "
inode.c:		ntfs_error(sb, "Failed to load the complete run list "
inode.c:		ntfs_debug("highest_vcn = 0x%llx, last_vcn - 1 = 0x%llx",
inode.c:	ntfs_debug("Done.");
inode.c:	ntfs_free(m);
inode.c:	ntfs_error(sb, "Couldn't find first extent of $DATA attribute in "
inode.c:	sb->s_op = &ntfs_mount_sops;
inode.c:	ntfs_error(sb, "Failed. Marking inode as bad.");
inode.c: * ntfs_commit_inode - write out a dirty inode
inode.c:int ntfs_commit_inode(ntfs_inode *ni)
inode.c:	ntfs_debug("Entering for inode 0x%lx.", ni->mft_no);
inode.c: * ntfs_put_inode - handler for when the inode reference count is decremented
inode.c: * The VFS calls ntfs_put_inode() every time the inode reference count (i_count)
inode.c:void ntfs_put_inode(struct inode *vi)
inode.c:		ntfs_inode *ni;
inode.c:		ni = NTFS_I(vi);
inode.c:void __ntfs_clear_inode(ntfs_inode *ni)
inode.c:	ntfs_debug("Entering for inode 0x%lx.", ni->mft_no);
inode.c:		err = ntfs_commit_inode(ni);
inode.c:			ntfs_error(ni->vol->sb, "Failed to commit dirty "
inode.c:	/* Synchronize with ntfs_commit_inode(). */
inode.c:		ntfs_error(ni->vol->sb, "Failed to commit dirty inode "
inode.c:			ntfs_clear_extent_inode(ni->ext.extent_ntfs_inos[i]);
inode.c:		kfree(ni->ext.extent_ntfs_inos);
inode.c:		ntfs_free(ni->run_list.rl);
inode.c:		ntfs_free(ni->attr_list);
inode.c:		ntfs_free(ni->attr_list_rl.rl);
inode.c:void ntfs_clear_extent_inode(ntfs_inode *ni)
inode.c:	__ntfs_clear_inode(ni);
inode.c:	ntfs_destroy_extent_inode(ni);
inode.c: * ntfs_clear_big_inode - clean up the ntfs specific part of an inode
inode.c: * When the VFS is going to remove an inode from memory, ntfs_clear_big_inode()
inode.c: * is called, which deallocates all memory belonging to the NTFS specific part
inode.c:void ntfs_clear_big_inode(struct inode *vi)
inode.c:	ntfs_inode *ni = NTFS_I(vi);
inode.c:	__ntfs_clear_inode(ni);
inode.c:			iput(VFS_I(ni->ext.base_ntfs_ino));
inode.c:			ni->ext.base_ntfs_ino = NULL;
inode.c: * ntfs_show_options - show mount options in /proc/mounts
inode.c: * Called by the VFS once for each mounted ntfs volume when someone reads
inode.c: * /proc/mounts in order to display the NTFS specific mount options of each
inode.c:int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt)
inode.c:	ntfs_volume *vol = NTFS_SB(mnt->mnt_sb);
inode.c:#ifdef NTFS_RW
inode.c: * ntfs_truncate - called when the i_size of an ntfs inode is changed
inode.c:void ntfs_truncate(struct inode *vi)
inode.c:	ntfs_warning(vi->i_sb, "Eeek: i_size may have changed! If you see "
inode.c:			"ntfs_{prepare,commit}_{,nonresident_}write() then "
inode.c: * ntfs_setattr - called from notify_change() when an attribute is being changed
inode.c:int ntfs_setattr(struct dentry *dentry, struct iattr *attr)
inode.c:		ntfs_error(vi->i_sb, "Changes in i_size are not supported "
inode.h: * inode.h - Defines for inode structures NTFS Linux kernel driver. Part of
inode.h: *	     the Linux-NTFS project.
inode.h: * along with this program (in the main directory of the Linux-NTFS
inode.h:#ifndef _LINUX_NTFS_INODE_H
inode.h:#define _LINUX_NTFS_INODE_H
inode.h:typedef struct _ntfs_inode ntfs_inode;
inode.h: * The NTFS in-memory inode structure. It is just used as an extension to the
inode.h:struct _ntfs_inode {
inode.h:	unsigned long state;	/* NTFS specific flags describing this inode.
inode.h:				   See ntfs_inode_state_bits below. */
inode.h:	ntfs_volume *vol;	/* Pointer to the ntfs volume of this inode. */
inode.h:	 * pointed to by base_ntfs_ino and nr_extents is always set to -1 (see
inode.h:		ntfs_inode **extent_ntfs_inos;	/* For nr_extents > 0, array of
inode.h:						   the ntfs inodes of the extent
inode.h:		ntfs_inode *base_ntfs_ino;	/* For nr_extents == -1, the
inode.h:						   ntfs inode of the base mft
inode.h: * Defined bits for the state field in the ntfs_inode structure.
inode.h:} ntfs_inode_state_bits;
inode.h: * should be independent of the (ntfs/vfs) inode structure so that an inode can
inode.h:static inline int NIno##flag(ntfs_inode *ni)		\
inode.h:static inline void NInoSet##flag(ntfs_inode *ni)	\
inode.h:static inline void NInoClear##flag(ntfs_inode *ni)	\
inode.h:static inline int NInoTestSet##flag(ntfs_inode *ni)		\
inode.h:static inline int NInoTestClear##flag(ntfs_inode *ni)		\
inode.h:/* Emit the ntfs inode bitops functions. */
inode.h: * The full structure containing a ntfs_inode and a vfs struct inode. Used for
inode.h:	ntfs_inode ntfs_inode;
inode.h:} big_ntfs_inode;
inode.h: * NTFS_I - return the ntfs inode given a vfs inode
inode.h: * NTFS_I() returns the ntfs inode associated with the VFS @inode.
inode.h:static inline ntfs_inode *NTFS_I(struct inode *inode)
inode.h:	return (ntfs_inode *)list_entry(inode, big_ntfs_inode, vfs_inode);
inode.h:static inline struct inode *VFS_I(ntfs_inode *ni)
inode.h:	return &((big_ntfs_inode *)ni)->vfs_inode;
inode.h: * ntfs_attr - ntfs in memory attribute structure
inode.h: * ntfs_{attr_}iget()/ntfs_test_inode()/ntfs_init_locked_inode() mechanism.
inode.h:} ntfs_attr;
inode.h:extern int ntfs_test_inode(struct inode *vi, ntfs_attr *na);
inode.h:extern struct inode *ntfs_iget(struct super_block *sb, unsigned long mft_no);
inode.h:extern struct inode *ntfs_attr_iget(struct inode *base_vi, ATTR_TYPES type,
inode.h:extern struct inode *ntfs_alloc_big_inode(struct super_block *sb);
inode.h:extern void ntfs_destroy_big_inode(struct inode *inode);
inode.h:extern void ntfs_clear_big_inode(struct inode *vi);
inode.h:extern ntfs_inode *ntfs_new_extent_inode(struct super_block *sb,
inode.h:extern void ntfs_clear_extent_inode(ntfs_inode *ni);
inode.h:extern void ntfs_read_inode_mount(struct inode *vi);
inode.h:extern void ntfs_put_inode(struct inode *vi);
inode.h:extern int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt);
inode.h:#ifdef NTFS_RW
inode.h:extern void ntfs_truncate(struct inode *vi);
inode.h:extern int ntfs_setattr(struct dentry *dentry, struct iattr *attr);
inode.h:#endif /* NTFS_RW */
inode.h:#endif /* _LINUX_NTFS_INODE_H */
Binary file inode.o matches
layout.h: * layout.h - All NTFS associated on-disk structures. Part of the Linux-NTFS
layout.h: * along with this program (in the main directory of the Linux-NTFS
layout.h:#ifndef _LINUX_NTFS_LAYOUT_H
layout.h:#define _LINUX_NTFS_LAYOUT_H
layout.h:/* The NTFS oem_id "NTFS    " */
layout.h:#define magicNTFS	const_cpu_to_le64(0x202020205346544eULL)
layout.h: *	The standard NTFS_BOOT_SECTOR is on sector 0 of the partition.
layout.h: * NTFS boot sector structure.
layout.h:	u64 oem_id;			/* Magic "NTFS    ". */
layout.h:	u8  unused[4];			/* zero, NTFS diskedit.exe states that
layout.h:} __attribute__ ((__packed__)) NTFS_BOOT_SECTOR;
layout.h: * Magic identifiers present at the beginning of all ntfs record containing
layout.h:	magic_HOLE = const_cpu_to_le32(0x454c4f48), /* ? (NTFS 3.0+?) */
layout.h:	/* Found in all ntfs record containing records. */
layout.h:} NTFS_RECORD_TYPES;
layout.h:#define ntfs_is_magic(x, m)	(   (u32)(x) == magic_##m )
layout.h:#define ntfs_is_magicp(p, m)	( *(u32*)(p) == magic_##m )
layout.h: * Specialised magic comparison macros for the NTFS_RECORD_TYPES defined above.
layout.h:#define ntfs_is_file_record(x)	( ntfs_is_magic (x, FILE) )
layout.h:#define ntfs_is_file_recordp(p)	( ntfs_is_magicp(p, FILE) )
layout.h:#define ntfs_is_mft_record(x)	( ntfs_is_file_record(x) )
layout.h:#define ntfs_is_mft_recordp(p)	( ntfs_is_file_recordp(p) )
layout.h:#define ntfs_is_indx_record(x)	( ntfs_is_magic (x, INDX) )
layout.h:#define ntfs_is_indx_recordp(p)	( ntfs_is_magicp(p, INDX) )
layout.h:#define ntfs_is_hole_record(x)	( ntfs_is_magic (x, HOLE) )
layout.h:#define ntfs_is_hole_recordp(p)	( ntfs_is_magicp(p, HOLE) )
layout.h:#define ntfs_is_rstr_record(x)	( ntfs_is_magic (x, RSTR) )
layout.h:#define ntfs_is_rstr_recordp(p)	( ntfs_is_magicp(p, RSTR) )
layout.h:#define ntfs_is_rcrd_record(x)	( ntfs_is_magic (x, RCRD) )
layout.h:#define ntfs_is_rcrd_recordp(p)	( ntfs_is_magicp(p, RCRD) )
layout.h:#define ntfs_is_chkd_record(x)	( ntfs_is_magic (x, CHKD) )
layout.h:#define ntfs_is_chkd_recordp(p)	( ntfs_is_magicp(p, CHKD) )
layout.h:#define ntfs_is_baad_record(x)	( ntfs_is_magic (x, BAAD) )
layout.h:#define ntfs_is_baad_recordp(p)	( ntfs_is_magicp(p, BAAD) )
layout.h:#define ntfs_is_empty_record(x)		( ntfs_is_magic (x, empty) )
layout.h:#define ntfs_is_empty_recordp(p)	( ntfs_is_magicp(p, empty) )
layout.h:	NTFS_RECORD_TYPES magic;	/* A four-byte magic identifying the
layout.h:				   from the start of the ntfs record. */
layout.h:} __attribute__ ((__packed__)) NTFS_RECORD;
layout.h:				   attribute (flags and ntfs version). Windows
layout.h:				   is new to NTFS3.0. */
layout.h:} NTFS_SYSTEM_FILES;
layout.h: * is considered stale and removed (FIXME: only ntfsck or the driver itself?).
layout.h:/*  0	NTFS_RECORD; -- Unfolded here as gcc doesn't like unnamed structs. */
layout.h:	NTFS_RECORD_TYPES magic;/* Usually the magic is "FILE". */
layout.h:	u16 usa_ofs;		/* See NTFS_RECORD definition above. */
layout.h:	u16 usa_count;		/* See NTFS_RECORD definition above. */
layout.h:/* NTFS 3.1+ (Windows XP and above) introduce the following additions. */
layout.h: * When reading we obviously use the data from the ntfs record header.
layout.h: * system file. On NTFS 3.0 volumes the names are just as the types are named
layout.h: *	unistr.c::ntfs_collate_names() and unistr.c::legal_ansi_char_array[]
layout.h: * definitions for the NTFS volume. With this, it is supposed to be safe for an
layout.h: * older NTFS driver to mount a volume containing a newer NTFS version without
layout.h: * Only the data attribute is ever compressed in the current ntfs driver in
layout.h: *	  NOTE: Even uncompressed files can be sparse on NTFS 3.0 volumes, then
layout.h: * NOTE on times in NTFS: All times are in MS standard time format, i.e. they
layout.h:	/* NTFS 1.2 */
layout.h:	/* NTFS 3.x */
layout.h: * If a volume has been upgraded from a previous NTFS version, then these
layout.h: *		Assume NTFS 1.2- format.
layout.h: *			Upgrade attribute to NTFS 3.x format.
layout.h: *			Use NTFS 1.2- format for access.
layout.h: *		Use NTFS 3.x format for access.
layout.h:	/* sizeof() = 72 bytes (NTFS 3.x) */
layout.h: *	  NTFS 3.0 volumes).
layout.h: * Possible namespaces for filenames in ntfs (8-bit).
layout.h:		/* The standard WinNT/2k NTFS long filenames. Case insensitive.
layout.h: * Attribute: Object id (NTFS 3.0+) (0x40).
layout.h: * NOTE: Not used in NTFS 3.0+, as security descriptors are stored centrally
layout.h: * On NTFS 3.0+, all security descriptors are stored in FILE_Secure. Only one
layout.h: * the NTFS volume and is used as an index into the $SII index, which maps
layout.h: * NOTE: Windows 2000 uses NTFS 3.0 while Windows NT4 service pack 6a uses
layout.h: *	 NTFS 1.2. I haven't personally seen other values yet.
layout.h:	u8 major_ver;		/* Major version of the ntfs format. */
layout.h:	u8 minor_ver;		/* Minor version of the ntfs format. */
layout.h:/*  0	NTFS_RECORD; -- Unfolded here as gcc doesn't like unnamed structs. */
layout.h:	NTFS_RECORD_TYPES magic;/* Magic is "INDX". */
layout.h:	u16 usa_ofs;		/* See NTFS_RECORD definition. */
layout.h:	u16 usa_count;		/* See NTFS_RECORD definition. */
layout.h: * When reading use the data from the ntfs record header.
layout.h: * NOTE: Before NTFS 3.0 only filename attributes were indexed.
layout.h:			   NTFS versions before 3.0 the only valid key is the
layout.h:			   FILE_NAME_ATTR. On NTFS 3.0+ the following
layout.h: * NTFS 3.0 during beta testing.
layout.h:#endif /* _LINUX_NTFS_LAYOUT_H */
logfile.c: * logfile.c - NTFS kernel journal handling. Part of the Linux-NTFS project.
logfile.c: * along with this program (in the main directory of the Linux-NTFS
logfile.c:#ifdef NTFS_RW
logfile.c:#include "ntfs.h"
logfile.c: * ntfs_check_restart_page_header - check the page header for consistency
logfile.c: * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
logfile.c:static BOOL ntfs_check_restart_page_header(struct inode *vi,
logfile.c:	ntfs_debug("Entering.");
logfile.c:	 * If the system or log page sizes are smaller than the ntfs block size
logfile.c:	if (logfile_system_page_size < NTFS_BLOCK_SIZE ||
logfile.c:			logfile_log_page_size < NTFS_BLOCK_SIZE ||
logfile.c:		ntfs_error(vi->i_sb, "$LogFile uses unsupported page size.");
logfile.c:		ntfs_error(vi->i_sb, "Found restart area in incorrect "
logfile.c:		ntfs_error(vi->i_sb, "$LogFile version %i.%i is not "
logfile.c:	usa_count = 1 + (logfile_system_page_size >> NTFS_BLOCK_SIZE_BITS);
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart page specifies "
logfile.c:			usa_end > NTFS_BLOCK_SIZE - sizeof(u16)) {
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart page specifies "
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart page specifies "
logfile.c:	if (!ntfs_is_chkd_record(rp->magic) && sle64_to_cpu(rp->chkdsk_lsn)) {
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart page is not modified "
logfile.c:	ntfs_debug("Done.");
logfile.c: * ntfs_check_restart_area - check the restart area for consistency
logfile.c: * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
logfile.c:static BOOL ntfs_check_restart_area(struct inode *vi, RESTART_PAGE_HEADER *rp)
logfile.c:	ntfs_debug("Entering.");
logfile.c:			NTFS_BLOCK_SIZE - sizeof(u16)) {
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart area specifies "
logfile.c:			ra_ofs + ca_ofs > NTFS_BLOCK_SIZE - sizeof(u16)) {
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart area specifies "
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart area is out of bounds "
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart area specifies "
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart area specifies "
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart area specifies "
logfile.c:		ntfs_error(vi->i_sb, "$LogFile restart area specifies "
logfile.c:	ntfs_debug("Done.");
logfile.c: * ntfs_check_log_client_array - check the log client array for consistency
logfile.c: * Unlike ntfs_check_restart_page_header() and ntfs_check_restart_area(), this
logfile.c:static BOOL ntfs_check_log_client_array(struct inode *vi,
logfile.c:	ntfs_debug("Entering.");
logfile.c:	ntfs_debug("Done.");
logfile.c:	ntfs_error(vi->i_sb, "$LogFile log client array is corrupt.");
logfile.c: * ntfs_check_and_load_restart_page - check the restart page for consistency
logfile.c: * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
logfile.c:static BOOL ntfs_check_and_load_restart_page(struct inode *vi,
logfile.c:	ntfs_debug("Entering.");
logfile.c:	if (!ntfs_check_restart_page_header(vi, rp, pos)) {
logfile.c:	if (!ntfs_check_restart_area(vi, rp)) {
logfile.c:	trp = ntfs_malloc_nofs(le32_to_cpu(rp->system_page_size));
logfile.c:		ntfs_error(vi->i_sb, "Failed to allocate memory for $LogFile "
logfile.c:			page = ntfs_map_page(vi->i_mapping, idx);
logfile.c:				ntfs_error(vi->i_sb, "Error mapping $LogFile "
logfile.c:			ntfs_unmap_page(page);
logfile.c:	if (post_read_mst_fixup((NTFS_RECORD*)trp,
logfile.c:		ntfs_error(vi->i_sb, "Multi sector transfer error detected in "
logfile.c:	ret = ntfs_check_log_client_array(vi, trp);
logfile.c:		ntfs_free(trp);
logfile.c:	ntfs_debug("Done.");
logfile.c:	ntfs_free(trp);
logfile.c: * ntfs_ckeck_logfile - check in the journal if the volume is consistent
logfile.c:BOOL ntfs_check_logfile(struct inode *log_vi)
logfile.c:	ntfs_volume *vol = NTFS_SB(log_vi->i_sb);
logfile.c:	ntfs_debug("Entering.");
logfile.c:		ntfs_error(vol->sb, "$LogFile is too small.");
logfile.c:				ntfs_unmap_page(page);
logfile.c:			page = ntfs_map_page(mapping, idx);
logfile.c:				ntfs_error(vol->sb, "Error mapping $LogFile "
logfile.c:		if (!ntfs_is_empty_recordp(kaddr))
logfile.c:		if (ntfs_is_rcrd_recordp(kaddr))
logfile.c:		if (ntfs_is_chkd_recordp(kaddr)) {
logfile.c:			ntfs_error(vol->sb, "$LogFile has been modified by "
logfile.c:		if (!ntfs_is_rstr_recordp(kaddr)) {
logfile.c:				pos = NTFS_BLOCK_SIZE >> 1;
logfile.c:				ntfs_error(vol->sb, "Found more than two "
logfile.c:		if (!ntfs_check_and_load_restart_page(log_vi,
logfile.c:		ntfs_unmap_page(page);
logfile.c:		ntfs_debug("Done.  ($LogFile is empty.)");
logfile.c:		ntfs_error(vol->sb, "Did not find two restart pages in "
logfile.c:		ntfs_error(vol->sb, "The two restart pages in $LogFile do not "
logfile.c:	ntfs_free(rstr1_ph);
logfile.c:	ntfs_free(rstr2_ph);
logfile.c:	ntfs_debug("Done.");
logfile.c:		ntfs_unmap_page(page);
logfile.c:		ntfs_free(rstr1_ph);
logfile.c:		ntfs_free(rstr2_ph);
logfile.c: * ntfs_is_logfile_clean - check in the journal if the volume is clean
logfile.c: * checked by a call to ntfs_check_logfile() and in particular if the $LogFile
logfile.c:BOOL ntfs_is_logfile_clean(struct inode *log_vi)
logfile.c:	ntfs_volume *vol = NTFS_SB(log_vi->i_sb);
logfile.c:	ntfs_debug("Entering.");
logfile.c:		ntfs_debug("Done.  ($LogFile is empty.)");
logfile.c:	 * first NTFS_BLOCK_SIZE bytes so it does not matter.
logfile.c:	page = ntfs_map_page(log_vi->i_mapping, 0);
logfile.c:		ntfs_error(vol->sb, "Error mapping $LogFile page (index 0).");
logfile.c:	if (!ntfs_is_rstr_record(rp->magic)) {
logfile.c:		ntfs_error(vol->sb, "No restart page found at offset zero in "
logfile.c:		ntfs_debug("Done.  $LogFile indicates a dirty shutdown.");
logfile.c:	ntfs_unmap_page(page);
logfile.c:	ntfs_debug("Done.  $LogFile indicates a clean shutdown.");
logfile.c:	ntfs_unmap_page(page);
logfile.c: * ntfs_empty_logfile - empty the contents of the $LogFile journal
logfile.c: * checked by a call to ntfs_check_logfile() and that ntfs_is_logfile_clean()
logfile.c:BOOL ntfs_empty_logfile(struct inode *log_vi)
logfile.c:	ntfs_volume *vol = NTFS_SB(log_vi->i_sb);
logfile.c:	ntfs_debug("Entering.");
logfile.c:			ntfs_error(vol->sb, "Insufficient memory to grab "
logfile.c:		 * go beyond i_size, because ntfs_writepage() will take care of
logfile.c:	ntfs_debug("Done.");
logfile.c:#endif /* NTFS_RW */
logfile.h: * logfile.h - Defines for NTFS kernel journal ($LogFile) handling.  Part of
logfile.h: *	       the Linux-NTFS project.
logfile.h: * along with this program (in the main directory of the Linux-NTFS
logfile.h:#ifndef _LINUX_NTFS_LOGFILE_H
logfile.h:#define _LINUX_NTFS_LOGFILE_H
logfile.h:#ifdef NTFS_RW
logfile.h:/*  0	NTFS_RECORD; -- Unfolded here as gcc doesn't like unnamed structs. */
logfile.h:/*  0*/	NTFS_RECORD_TYPES magic;/* The magic is "RSTR". */
logfile.h:/*  4*/	u16 usa_ofs;		/* See NTFS_RECORD definition in layout.h.
logfile.h:/*  6*/	u16 usa_count;		/* See NTFS_RECORD definition in layout.h. */
logfile.h:				   time in NTFS format (see time.h). */
logfile.h:				   always be "NTFS" with the remaining bytes
logfile.h:extern BOOL ntfs_check_logfile(struct inode *log_vi);
logfile.h:extern BOOL ntfs_is_logfile_clean(struct inode *log_vi);
logfile.h:extern BOOL ntfs_empty_logfile(struct inode *log_vi);
logfile.h:#endif /* NTFS_RW */
logfile.h:#endif /* _LINUX_NTFS_LOGFILE_H */
Makefile:# Rules for making the NTFS driver.
Makefile:obj-$(CONFIG_NTFS_FS) += ntfs.o
Makefile:ntfs-objs := aops.o attrib.o compress.o debug.o dir.o file.o inode.o logfile.o \
Makefile:EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.8\"
Makefile:ifeq ($(CONFIG_NTFS_DEBUG),y)
Makefile:ifeq ($(CONFIG_NTFS_RW),y)
Makefile:EXTRA_CFLAGS += -DNTFS_RW
malloc.h: * malloc.h - NTFS kernel memory handling. Part of the Linux-NTFS project.
malloc.h: * along with this program (in the main directory of the Linux-NTFS
malloc.h:#ifndef _LINUX_NTFS_MALLOC_H
malloc.h:#define _LINUX_NTFS_MALLOC_H
malloc.h: * ntfs_malloc_nofs - allocate memory in multiples of pages
malloc.h:static inline void *ntfs_malloc_nofs(unsigned long size)
malloc.h:static inline void ntfs_free(void *addr)
malloc.h:#endif /* _LINUX_NTFS_MALLOC_H */
mft.c: * mft.c - NTFS kernel mft record operations. Part of the Linux-NTFS project.
mft.c: * along with this program (in the main directory of the Linux-NTFS 
mft.c:#include "ntfs.h"
mft.c:	m->usa_count = cpu_to_le16(size / NTFS_BLOCK_SIZE + 1);
mft.c: * @ni:		ntfs inode of mft record
mft.c:int format_mft_record(ntfs_inode *ni, MFT_RECORD *mft_rec)
mft.c: * ntfs_readpage - external declaration, function is in fs/ntfs/aops.c
mft.c:extern int ntfs_readpage(struct file *, struct page *);
mft.c: * ntfs_mft_aops - address space operations for access to $MFT
mft.c: * ntfs_map_page() in map_mft_record_page().
mft.c:struct address_space_operations ntfs_mft_aops = {
mft.c:	.readpage	= ntfs_readpage,	/* Fill page with data. */
mft.c: * @ni:		ntfs inode whose mft record page to map
mft.c: * This maps the page in which the mft record of the ntfs inode @ni is situated
mft.c:static inline MFT_RECORD *map_mft_record_page(ntfs_inode *ni)
mft.c:	ntfs_volume *vol = ni->vol;
mft.c:	page = ntfs_map_page(mft_vi->i_mapping, index);
mft.c:	ntfs_error(vol->sb, "Failed with error code %lu.", -PTR_ERR(page));
mft.c: * @ni:		ntfs inode whose MFT record to map
mft.c: * This in turn uses ntfs_map_page() to get the page containing the wanted mft
mft.c: * If read_cache_page() invokes ntfs_readpage() to load the page from disk, it
mft.c: * ntfs_map_page() waits for PG_locked to become clear and checks if
mft.c:MFT_RECORD *map_mft_record(ntfs_inode *ni)
mft.c:	ntfs_debug("Entering for mft_no 0x%lx.", ni->mft_no);
mft.c:	/* Make sure the ntfs inode doesn't go away. */
mft.c:	ntfs_error(ni->vol->sb, "Failed with error code %lu.", -PTR_ERR(m));
mft.c: * @ni:		ntfs inode whose mft record page to unmap
mft.c: * This unmaps the page in which the mft record of the ntfs inode @ni is
mft.c: * The unmap happens via ntfs_unmap_page() which in turn decrements the use
mft.c:static inline void unmap_mft_record_page(ntfs_inode *ni)
mft.c:	ntfs_unmap_page(ni->page);
mft.c: * @ni:		ntfs inode whose MFT record to unmap
mft.c: * record and releases it for others to get hold of. We also release the ntfs
mft.c: * inode by decrementing the ntfs inode reference count.
mft.c:void unmap_mft_record(ntfs_inode *ni)
mft.c:	ntfs_debug("Entering for mft_no 0x%lx.", ni->mft_no);
mft.c:	 * If pure ntfs_inode, i.e. no vfs inode attached, we leave it to
mft.c:	 * ntfs_clear_extent_inode() in the extent inode case, and to the
mft.c:	 * caller in the non-extent, yet pure ntfs inode case, to do the actual
mft.c: * @base_ni:	base ntfs inode
mft.c: * @ntfs_ino:	on successful return, pointer to the ntfs_inode structure
mft.c: * On successful return, @ntfs_ino contains a pointer to the ntfs_inode
mft.c:MFT_RECORD *map_extent_mft_record(ntfs_inode *base_ni, MFT_REF mref,
mft.c:		ntfs_inode **ntfs_ino)
mft.c:	ntfs_inode *ni = NULL;
mft.c:	ntfs_inode **extent_nis = NULL;
mft.c:	ntfs_debug("Mapping extent mft record 0x%lx (base mft record 0x%lx).",
mft.c:	/* Make sure the base ntfs inode doesn't go away. */
mft.c:		extent_nis = base_ni->ext.extent_ntfs_inos;
mft.c:			/* Make sure the ntfs inode doesn't go away. */
mft.c:				ntfs_debug("Done 1.");
mft.c:				*ntfs_ino = ni;
mft.c:			ntfs_error(base_ni->vol->sb, "Found stale extent mft "
mft.c:		ntfs_error(base_ni->vol->sb, "Failed to map extent "
mft.c:	/* Record wasn't there. Get a new ntfs inode and initialize it. */
mft.c:	ni = ntfs_new_extent_inode(base_ni->vol->sb, mft_no);
mft.c:	ni->ext.base_ntfs_ino = base_ni;
mft.c:		ntfs_clear_extent_inode(ni);
mft.c:		ntfs_error(base_ni->vol->sb, "Found stale extent mft "
mft.c:		ntfs_inode **tmp;
mft.c:		int new_size = (base_ni->nr_extents + 4) * sizeof(ntfs_inode *);
mft.c:		tmp = (ntfs_inode **)kmalloc(new_size, GFP_NOFS);
mft.c:			ntfs_error(base_ni->vol->sb, "Failed to allocate "
mft.c:		if (base_ni->ext.extent_ntfs_inos) {
mft.c:			memcpy(tmp, base_ni->ext.extent_ntfs_inos, new_size -
mft.c:					4 * sizeof(ntfs_inode *));
mft.c:			kfree(base_ni->ext.extent_ntfs_inos);
mft.c:		base_ni->ext.extent_ntfs_inos = tmp;
mft.c:	base_ni->ext.extent_ntfs_inos[base_ni->nr_extents++] = ni;
mft.c:	ntfs_debug("Done 2.");
mft.c:	*ntfs_ino = ni;
mft.c:		ntfs_clear_extent_inode(ni);
mft.h: * mft.h - Defines for mft record handling in NTFS Linux kernel driver.
mft.h: *	   Part of the Linux-NTFS project.
mft.h: * along with this program (in the main directory of the Linux-NTFS
mft.h:#ifndef _LINUX_NTFS_MFT_H
mft.h:#define _LINUX_NTFS_MFT_H
mft.h:extern int format_mft_record(ntfs_inode *ni, MFT_RECORD *m);
mft.h:extern MFT_RECORD *map_mft_record(ntfs_inode *ni);
mft.h:extern void unmap_mft_record(ntfs_inode *ni);
mft.h:extern MFT_RECORD *map_extent_mft_record(ntfs_inode *base_ni, MFT_REF mref,
mft.h:		ntfs_inode **ntfs_ino);
mft.h:static inline void unmap_extent_mft_record(ntfs_inode *ni)
mft.h:#ifdef NTFS_RW
mft.h: * @ni:		ntfs inode structure of mft record
mft.h:static inline void flush_dcache_mft_record_page(ntfs_inode *ni)
mft.h:#endif /* NTFS_RW */
mft.h:#endif /* _LINUX_NTFS_MFT_H */
Binary file mft.o matches
mst.c: * mst.c - NTFS multi sector transfer protection handling code. Part of the
mst.c: *	   Linux-NTFS project.
mst.c: * along with this program (in the main directory of the Linux-NTFS
mst.c:#include "ntfs.h"
mst.c: * magic of the ntfs record header being processed with "BAAD" (in memory only!)
mst.c:int post_read_mst_fixup(NTFS_RECORD *b, const u32 size)
mst.c:	if ( size & (NTFS_BLOCK_SIZE - 1)	||
mst.c:	     (size >> NTFS_BLOCK_SIZE_BITS) != usa_count)
mst.c:	data_pos = (u16*)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
mst.c:		data_pos += NTFS_BLOCK_SIZE/sizeof(u16);
mst.c:	data_pos = (u16*)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
mst.c:		data_pos += NTFS_BLOCK_SIZE/sizeof(u16);
mst.c: * array header in the ntfs record before calling this function, otherwise it
mst.c:int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size)
mst.c:	if (!b || ntfs_is_baad_record(b->magic) ||
mst.c:			ntfs_is_hole_record(b->magic))
mst.c:	if ( size & (NTFS_BLOCK_SIZE - 1)	||
mst.c:	     (size >> NTFS_BLOCK_SIZE_BITS) != usa_count)
mst.c:	data_pos = (u16*)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
mst.c:		data_pos += NTFS_BLOCK_SIZE/sizeof(u16);
mst.c:void post_write_mst_fixup(NTFS_RECORD *b)
mst.c:	data_pos = (u16*)b + NTFS_BLOCK_SIZE/sizeof(u16) - 1;
mst.c:		data_pos += NTFS_BLOCK_SIZE/sizeof(u16);
namei.c: * namei.c - NTFS kernel directory inode operations. Part of the Linux-NTFS
namei.c: * along with this program (in the main directory of the Linux-NTFS 
namei.c:#include "ntfs.h"
namei.c: * ntfs_lookup - find the inode represented by a dentry in a directory inode
namei.c: * In short, ntfs_lookup() looks for the inode represented by the dentry @dent
namei.c: * supplying the name of the inode in @dent->d_name.name. ntfs_lookup()
namei.c: * directory, the corresponding inode is loaded by calling ntfs_iget() on its
namei.c: * In order to handle the case insensitivity issues of NTFS with regards to the
namei.c: * dentry aliases that only differ in case in ->ntfs_lookup() while maintaining
namei.c: * ->ntfs_readdir() but that a lookup for any other case (or for the short file
namei.c: * name) will not find anything in dcache and will enter ->ntfs_lookup()
namei.c: *    ntfs_lookup_inode_by_name() will return with name set to NULL and we
namei.c: *    the WIN32 namespace. In this case ntfs_lookup_inode_by_name() will return
namei.c: *    with name set to point to a kmalloc()ed ntfs_name structure containing
namei.c: *    ntfs_lookup_inode_by_name() will return with name set to point to a
namei.c: *    kmalloc()ed ntfs_name structure containing the mft reference (cpu endian)
namei.c:static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent,
namei.c:	ntfs_volume *vol = NTFS_SB(dir_ino->i_sb);
namei.c:	ntfs_name *name = NULL;
namei.c:	ntfs_debug("Looking up %s in directory inode 0x%lx.",
namei.c:	uname_len = ntfs_nlstoucs(vol, dent->d_name.name, dent->d_name.len,
namei.c:		ntfs_error(vol->sb, "Failed to convert name to Unicode.");
namei.c:	mref = ntfs_lookup_inode_by_name(NTFS_I(dir_ino), uname, uname_len,
namei.c:	kmem_cache_free(ntfs_name_cache, uname);
namei.c:		ntfs_debug("Found inode 0x%lx. Calling ntfs_iget.", dent_ino);
namei.c:		dent_inode = ntfs_iget(vol->sb, dent_ino);
namei.c:			if (MSEQNO(mref) == NTFS_I(dent_inode)->seq_no ||
namei.c:					ntfs_debug("Done.");
namei.c:			ntfs_error(vol->sb, "Found stale reference to inode "
namei.c:					NTFS_I(dent_inode)->seq_no);
namei.c:			ntfs_error(vol->sb, "ntfs_iget(0x%lx) failed with "
namei.c:		ntfs_debug("Entry was not found, adding negative dentry.");
namei.c:		ntfs_debug("Done.");
namei.c:	ntfs_error(vol->sb, "ntfs_lookup_ino_by_name() failed with error "
namei.c:	ntfs_inode *ni = NTFS_I(dent_inode);
namei.c:		nls_name.len = (unsigned)ntfs_ucstonls(vol,
namei.c:		ni = NTFS_I(dent_inode);
namei.c:				ntfs_error(vol->sb, "Inode corrupt: No WIN32 "
namei.c:		nls_name.len = (unsigned)ntfs_ucstonls(vol,
namei.c:		 * the reference count to balance the ntfs_iget() we did
namei.c:	/* Balance the ntfs_iget() we did above. */
namei.c:	ntfs_error(vol->sb, "Illegal file name attribute. Run chkdsk.");
namei.c:struct inode_operations ntfs_dir_inode_ops = {
namei.c:	.lookup	= ntfs_lookup,	/* VFS: Lookup directory. */
namei.c: * ntfs_get_parent - find the dentry of the parent of a given directory dentry
namei.c: * Note: ntfs_get_parent() is called with @child_dent->d_inode->i_sem down.
namei.c:struct dentry *ntfs_get_parent(struct dentry *child_dent)
namei.c:	ntfs_inode *ni = NTFS_I(vi);
namei.c:	ntfs_debug("Entering for inode 0x%lx.", vi->i_ino);
namei.c:		ntfs_error(vi->i_sb, "Inode 0x%lx does not have a file name "
namei.c:	parent_vi = ntfs_iget(vi->i_sb, parent_ino);
namei.c:		ntfs_error(vi->i_sb, "Failed to get parent directory inode "
namei.c:	ntfs_debug("Done for inode 0x%lx.", vi->i_ino);
namei.c: * ntfs_get_dentry - find a dentry for the inode from a file handle sub-fragment
namei.c: * @sb:		super block identifying the mounted ntfs volume
namei.c:struct dentry *ntfs_get_dentry(struct super_block *sb, void *fh)
namei.c:	ntfs_debug("Entering for inode 0x%lx, generation 0x%x.", ino, gen);
namei.c:	vi = ntfs_iget(sb, ino);
namei.c:		ntfs_error(sb, "Failed to get inode 0x%lx.", ino);
namei.c:		ntfs_error(sb, "Inode 0x%lx, bad count: %d %d or version 0x%x "
namei.c:	ntfs_debug("Done for inode 0x%lx, generation 0x%x.", ino, gen);
Binary file namei.o matches
ntfs.h: * ntfs.h - Defines for NTFS Linux kernel driver. Part of the Linux-NTFS
ntfs.h: * along with this program (in the main directory of the Linux-NTFS
ntfs.h:#ifndef _LINUX_NTFS_H
ntfs.h:#define _LINUX_NTFS_H
ntfs.h:	NTFS_BLOCK_SIZE		= 512,
ntfs.h:	NTFS_BLOCK_SIZE_BITS	= 9,
ntfs.h:	NTFS_SB_MAGIC		= 0x5346544e,	/* 'NTFS' */
ntfs.h:	NTFS_MAX_NAME_LEN	= 255,
ntfs.h:} NTFS_CONSTANTS;
ntfs.h:extern kmem_cache_t *ntfs_name_cache;
ntfs.h:extern kmem_cache_t *ntfs_inode_cache;
ntfs.h:extern kmem_cache_t *ntfs_big_inode_cache;
ntfs.h:extern kmem_cache_t *ntfs_attr_ctx_cache;
ntfs.h:extern struct super_operations ntfs_sops;
ntfs.h:extern struct super_operations ntfs_mount_sops;
ntfs.h:extern struct address_space_operations ntfs_aops;
ntfs.h:extern struct address_space_operations ntfs_mft_aops;
ntfs.h:extern struct  file_operations ntfs_file_ops;
ntfs.h:extern struct inode_operations ntfs_file_inode_ops;
ntfs.h:extern struct  file_operations ntfs_dir_ops;
ntfs.h:extern struct inode_operations ntfs_dir_inode_ops;
ntfs.h:extern struct  file_operations ntfs_empty_file_ops;
ntfs.h:extern struct inode_operations ntfs_empty_inode_ops;
ntfs.h: * NTFS_SB - return the ntfs volume given a vfs super block
ntfs.h: * NTFS_SB() returns the ntfs volume associated with the VFS super block @sb.
ntfs.h:static inline ntfs_volume *NTFS_SB(struct super_block *sb)
ntfs.h: * ntfs_unmap_page - release a page that was mapped using ntfs_map_page()
ntfs.h: * Unpin, unmap and release a page that was obtained from ntfs_map_page().
ntfs.h:static inline void ntfs_unmap_page(struct page *page)
ntfs.h: * ntfs_map_page - map a page into accessible memory, reading it if necessary
ntfs.h: * with ntfs_map_page() to get the kernel virtual address of the page.
ntfs.h: * When finished with the page, the caller has to call ntfs_unmap_page() to
ntfs.h: * must provide it independently of the ntfs_{un}map_page() calls by using
ntfs.h: * used as ntfs_map_page() can block.
ntfs.h: * obtained using PTR_ERR() on the return value of ntfs_map_page().
ntfs.h:static inline struct page *ntfs_map_page(struct address_space *mapping,
ntfs.h:		ntfs_unmap_page(page);
ntfs.h:/* From fs/ntfs/compress.c */
ntfs.h:extern int ntfs_read_compressed_block(struct page *page);
ntfs.h:/* From fs/ntfs/super.c */
ntfs.h:extern unsigned long ntfs_nr_upcase_users;
ntfs.h:extern unsigned long ntfs_nr_mounts;
ntfs.h:extern struct semaphore ntfs_lock;
ntfs.h:/* From fs/ntfs/compress.c */
ntfs.h:/* From fs/ntfs/mst.c */
ntfs.h:extern int post_read_mst_fixup(NTFS_RECORD *b, const u32 size);
ntfs.h:extern int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size);
ntfs.h:extern void post_write_mst_fixup(NTFS_RECORD *b);
ntfs.h:/* From fs/ntfs/unistr.c */
ntfs.h:extern BOOL ntfs_are_names_equal(const uchar_t *s1, size_t s1_len,
ntfs.h:extern int ntfs_collate_names(const uchar_t *name1, const u32 name1_len,
ntfs.h:extern int ntfs_ucsncmp(const uchar_t *s1, const uchar_t *s2, size_t n);
ntfs.h:extern int ntfs_ucsncasecmp(const uchar_t *s1, const uchar_t *s2, size_t n,
ntfs.h:extern void ntfs_upcase_name(uchar_t *name, u32 name_len,
ntfs.h:extern void ntfs_file_upcase_value(FILE_NAME_ATTR *file_name_attr,
ntfs.h:extern int ntfs_file_compare_values(FILE_NAME_ATTR *file_name_attr1,
ntfs.h:extern int ntfs_nlstoucs(const ntfs_volume *vol, const char *ins,
ntfs.h:extern int ntfs_ucstonls(const ntfs_volume *vol, const uchar_t *ins,
ntfs.h:/* From fs/ntfs/upcase.c */
ntfs.h:#endif /* _LINUX_NTFS_H */
Binary file ntfs.o matches
super.c: * super.c - NTFS kernel super block handling. Part of the Linux-NTFS project.
super.c: * along with this program (in the main directory of the Linux-NTFS
super.c:#include "ntfs.h"
super.c:static unsigned long ntfs_nr_compression_users;
super.c:/* Error constants/strings used in inode.c::ntfs_show_options(). */
super.c: * Copied from old ntfs driver (which copied from vfat driver).
super.c: * @vol:	ntfs volume
super.c: * Parse the recognized options in @opt for the ntfs volume described by @vol.
super.c:static BOOL parse_options(ntfs_volume *vol, char *opt)
super.c:#define NTFS_GETOPT_WITH_DEFAULT(option, variable, default_value)	\
super.c:#define NTFS_GETOPT(option, variable)					\
super.c:#define NTFS_GETOPT_BOOL(option, variable)				\
super.c:#define NTFS_GETOPT_OPTIONS_ARRAY(option, variable, opt_array)		\
super.c:	ntfs_debug("Entering with mount options string: %s", opt);
super.c:		NTFS_GETOPT("uid", uid)
super.c:		else NTFS_GETOPT("gid", gid)
super.c:		else NTFS_GETOPT("umask", fmask = dmask)
super.c:		else NTFS_GETOPT("fmask", fmask)
super.c:		else NTFS_GETOPT("dmask", dmask)
super.c:		else NTFS_GETOPT("mft_zone_multiplier", mft_zone_multiplier)
super.c:		else NTFS_GETOPT_WITH_DEFAULT("sloppy", sloppy, TRUE)
super.c:		else NTFS_GETOPT_BOOL("show_sys_files", show_sys_files)
super.c:		else NTFS_GETOPT_BOOL("case_sensitive", case_sensitive)
super.c:		else NTFS_GETOPT_OPTIONS_ARRAY("errors", on_errors,
super.c:			ntfs_warning(vol->sb, "Ignoring obsolete option %s.",
super.c:				ntfs_warning(vol->sb, "Option iocharset is "
super.c:					ntfs_error(vol->sb, "NLS character set "
super.c:				ntfs_error(vol->sb, "NLS character set %s not "
super.c:			ntfs_warning(vol->sb, "Option utf8 is no longer "
super.c:			ntfs_error(vol->sb, "Unrecognized mount option %s.", p);
super.c:#undef NTFS_GETOPT_OPTIONS_ARRAY
super.c:#undef NTFS_GETOPT_BOOL
super.c:#undef NTFS_GETOPT
super.c:#undef NTFS_GETOPT_WITH_DEFAULT
super.c:		ntfs_warning(vol->sb, "Sloppy option given. Ignoring "
super.c:			ntfs_error(vol->sb, "Invalid errors option argument "
super.c:			ntfs_error(vol->sb, "Cannot change NLS character set "
super.c:		ntfs_debug("Using NLS character set %s.", nls_map->charset);
super.c:				ntfs_error(vol->sb, "Failed to load default "
super.c:			ntfs_debug("Using default NLS character set (%s).",
super.c:			ntfs_error(vol->sb, "Cannot change mft_zone_multiplier "
super.c:			ntfs_error(vol->sb, "Invalid mft_zone_multiplier. "
super.c:	ntfs_error(vol->sb, "The %s option requires an argument.", p);
super.c:	ntfs_error(vol->sb, "The %s option requires a boolean argument.", p);
super.c:	ntfs_error(vol->sb, "Invalid %s option argument: %s", p, ov);
super.c: * ntfs_remount - change the mount options of a mounted ntfs filesystem
super.c: * @sb:		superblock of mounted ntfs filesystem
super.c: * Change the mount options of an already mounted ntfs filesystem.
super.c: * ntfs_remount() returns successfully (i.e. returns 0).  Otherwise,
super.c:static int ntfs_remount(struct super_block *sb, int *flags, char *opt)
super.c:	ntfs_volume *vol = NTFS_SB(sb);
super.c:	ntfs_debug("Entering with remount options string: %s", opt);
super.c:#ifndef NTFS_RW
super.c:#else /* ! NTFS_RW */
super.c:			ntfs_error(sb, "Volume has errors and is read-only%s",
super.c:		if (!ntfs_empty_logfile(vol->logfile_ino)) {
super.c:			ntfs_error(sb, "Failed to empty journal $LogFile%s",
super.c:#endif /* ! NTFS_RW */
super.c:	ntfs_debug("Done.");
super.c: * is_boot_sector_ntfs - check whether a boot sector is a valid NTFS boot sector
super.c: * is_boot_sector_ntfs() checks whether the boot sector @b is a valid NTFS boot
super.c:static BOOL is_boot_sector_ntfs(const struct super_block *sb,
super.c:		const NTFS_BOOT_SECTOR *b, const BOOL silent)
super.c:			goto not_ntfs;
super.c:	/* Check OEMidentifier is "NTFS    " */
super.c:	if (b->oem_id != magicNTFS)
super.c:		goto not_ntfs;
super.c:		goto not_ntfs;
super.c:		goto not_ntfs;
super.c:		goto not_ntfs;
super.c:		goto not_ntfs;
super.c:			goto not_ntfs;
super.c:			goto not_ntfs;
super.c:		ntfs_warning(sb, "Invalid end of sector marker.");
super.c:not_ntfs:
super.c: * read_ntfs_boot_sector - read the NTFS boot sector of a device
super.c: * NOTE: To call this function, @sb must have the fields s_dev, the ntfs super
super.c: * block (u.ntfs_sb), nr_blocks and the device flags (s_flags) initialized
super.c:static struct buffer_head *read_ntfs_boot_sector(struct super_block *sb,
super.c:	long nr_blocks = NTFS_SB(sb)->nr_blocks;
super.c:		if (is_boot_sector_ntfs(sb, (NTFS_BOOT_SECTOR*)
super.c:			ntfs_error(sb, "Primary boot sector is invalid.");
super.c:		ntfs_error(sb, read_err_str, "primary");
super.c:	if (!(NTFS_SB(sb)->on_errors & ON_ERRORS_RECOVER)) {
super.c:			ntfs_error(sb, "Mount option errors=recover not used. "
super.c:		if (is_boot_sector_ntfs(sb, (NTFS_BOOT_SECTOR*)
super.c:		ntfs_error(sb, read_err_str, "backup");
super.c:		if (is_boot_sector_ntfs(sb, (NTFS_BOOT_SECTOR*)
super.c:			ntfs_error(sb, "Could not find a valid backup boot "
super.c:		ntfs_error(sb, read_err_str, "backup");
super.c:			ntfs_warning(sb, "Hot-fix: Recovering invalid primary "
super.c:			ntfs_error(sb, "Hot-fix: Device write error while "
super.c:			ntfs_warning(sb, "Hot-fix: Recovery of primary boot "
super.c:	ntfs_warning(sb, "Using backup boot sector.");
super.c: * parse_ntfs_boot_sector - parse the boot sector and store the data in @vol
super.c: * Parse the ntfs boot sector @b and store all imporant information therein in
super.c: * the ntfs super block @vol. Return TRUE on success and FALSE on error.
super.c:static BOOL parse_ntfs_boot_sector(ntfs_volume *vol, const NTFS_BOOT_SECTOR *b)
super.c:	ntfs_debug("vol->sector_size = %i (0x%x)", vol->sector_size,
super.c:	ntfs_debug("vol->sector_size_bits = %i (0x%x)", vol->sector_size_bits,
super.c:		ntfs_warning(vol->sb, "The boot sector indicates a sector size "
super.c:	ntfs_debug("sectors_per_cluster = 0x%x", b->bpb.sectors_per_cluster);
super.c:	ntfs_debug("sectors_per_cluster_bits = 0x%x",
super.c:	ntfs_debug("number of hidden sectors = 0x%x", nr_hidden_sects);
super.c:	ntfs_debug("vol->cluster_size = %i (0x%x)", vol->cluster_size,
super.c:	ntfs_debug("vol->cluster_size_mask = 0x%x", vol->cluster_size_mask);
super.c:	ntfs_debug("vol->cluster_size_bits = %i (0x%x)",
super.c:		ntfs_error(vol->sb, "Sector sizes above the cluster size are "
super.c:		ntfs_error(vol->sb, "Cluster sizes smaller than the device "
super.c:	ntfs_debug("clusters_per_mft_record = %i (0x%x)",
super.c:	ntfs_debug("vol->mft_record_size = %i (0x%x)", vol->mft_record_size,
super.c:	ntfs_debug("vol->mft_record_size_mask = 0x%x",
super.c:	ntfs_debug("vol->mft_record_size_bits = %i (0x%x)",
super.c:	ntfs_debug("clusters_per_index_record = %i (0x%x)",
super.c:	ntfs_debug("vol->index_record_size = %i (0x%x)",
super.c:	ntfs_debug("vol->index_record_size_mask = 0x%x",
super.c:	ntfs_debug("vol->index_record_size_bits = %i (0x%x)",
super.c:		ntfs_error(vol->sb, "Cannot handle 64-bit clusters. Sorry.");
super.c:	ntfs_debug("vol->nr_clusters = 0x%llx", (long long)vol->nr_clusters);
super.c:			ntfs_error(vol->sb, "Volume size (%lluTiB) is too "
super.c:		ntfs_error(vol->sb, "MFT LCN is beyond end of volume. Weird.");
super.c:	ntfs_debug("vol->mft_lcn = 0x%llx", (long long)vol->mft_lcn);
super.c:		ntfs_error(vol->sb, "MFTMirr LCN is beyond end of volume. "
super.c:	ntfs_debug("vol->mftmirr_lcn = 0x%llx", (long long)vol->mftmirr_lcn);
super.c:#ifdef NTFS_RW
super.c:	ntfs_debug("vol->mftmirr_size = %i", vol->mftmirr_size);
super.c:#endif /* NTFS_RW */
super.c:	ntfs_debug("vol->serial_no = 0x%llx",
super.c:	ntfs_debug("vol->mft_zone_multiplier = 0x%x",
super.c:	ntfs_debug("vol->mft_zone_start = 0x%llx",
super.c:	ntfs_debug("vol->mft_zone_end = 0x%llx", (long long)vol->mft_zone_end);
super.c:#ifdef NTFS_RW
super.c: * @vol:	ntfs super block describing device whose mft mirror to load
super.c:static BOOL load_and_init_mft_mirror(ntfs_volume *vol)
super.c:	ntfs_inode *tmp_ni;
super.c:	tmp_ino = ntfs_iget(vol->sb, FILE_MFTMirr);
super.c:	 * ntfs_read_inode() will have set up the default ones.
super.c:	tmp_ino->i_op = &ntfs_empty_inode_ops;
super.c:	tmp_ino->i_fop = &ntfs_empty_file_ops;
super.c:	tmp_ino->i_mapping->a_ops = &ntfs_mft_aops;
super.c:	tmp_ni = NTFS_I(tmp_ino);
super.c: * @vol:	ntfs super block describing device whose mft mirror to check
super.c:static BOOL check_mft_mirror(ntfs_volume *vol)
super.c:	ntfs_inode *mirr_ni;
super.c:	ntfs_debug("Entering.");
super.c:				ntfs_unmap_page(mft_page);
super.c:				ntfs_unmap_page(mirr_page);
super.c:			mft_page = ntfs_map_page(vol->mft_ino->i_mapping,
super.c:				ntfs_error(sb, "Failed to read $MFT.");
super.c:			mirr_page = ntfs_map_page(vol->mftmirr_ino->i_mapping,
super.c:				ntfs_error(sb, "Failed to read $MFTMirr.");
super.c:		if (ntfs_is_baad_recordp(kmft)) {
super.c:			ntfs_error(sb, "Incomplete multi sector transfer "
super.c:			ntfs_unmap_page(mirr_page);
super.c:			ntfs_unmap_page(mft_page);
super.c:		if (ntfs_is_baad_recordp(kmirr)) {
super.c:			ntfs_error(sb, "Incomplete multi sector transfer "
super.c:			ntfs_error(sb, "$MFT and $MFTMirr (record %i) do not "
super.c:					"match.  Run ntfsfix or chkdsk.", i);
super.c:	ntfs_unmap_page(mft_page);
super.c:	ntfs_unmap_page(mirr_page);
super.c:	mirr_ni = NTFS_I(vol->mftmirr_ino);
super.c:			ntfs_error(sb, "$MFTMirr location mismatch.  "
super.c:	ntfs_debug("Done.");
super.c: * @vol:	ntfs super block describing device whose logfile to load
super.c:static BOOL load_and_check_logfile(ntfs_volume *vol)
super.c:	ntfs_debug("Entering.");
super.c:	tmp_ino = ntfs_iget(vol->sb, FILE_LogFile);
super.c:	if (!ntfs_check_logfile(tmp_ino)) {
super.c:		/* ntfs_check_logfile() will have displayed error output. */
super.c:	ntfs_debug("Done.");
super.c:#endif /* NTFS_RW */
super.c: * load_and_init_upcase - load the upcase table for an ntfs volume
super.c: * @vol:	ntfs super block describing device whose upcase to load
super.c:static BOOL load_and_init_upcase(ntfs_volume *vol)
super.c:	ntfs_debug("Entering.");
super.c:	ino = ntfs_iget(sb, FILE_UpCase);
super.c:	vol->upcase = (uchar_t*)ntfs_malloc_nofs(ino->i_size);
super.c:		page = ntfs_map_page(ino->i_mapping, index);
super.c:		ntfs_unmap_page(page);
super.c:	ntfs_debug("Read %llu bytes from $UpCase (expected %u bytes).",
super.c:	down(&ntfs_lock);
super.c:		ntfs_debug("Using volume specified $UpCase since default is "
super.c:		up(&ntfs_lock);
super.c:		ntfs_free(vol->upcase);
super.c:		ntfs_nr_upcase_users++;
super.c:		up(&ntfs_lock);
super.c:		ntfs_debug("Volume specified $UpCase matches default. Using "
super.c:	up(&ntfs_lock);
super.c:	ntfs_debug("Using volume specified $UpCase since it does not match "
super.c:	ntfs_free(vol->upcase);
super.c:	down(&ntfs_lock);
super.c:		ntfs_nr_upcase_users++;
super.c:		up(&ntfs_lock);
super.c:		ntfs_error(sb, "Failed to load $UpCase from the volume. Using "
super.c:	up(&ntfs_lock);
super.c:	ntfs_error(sb, "Failed to initialized upcase table.");
super.c: * @vol:	ntfs super block describing device whose system files to load
super.c: * the ntfs super block @vol.
super.c:static BOOL load_system_files(ntfs_volume *vol)
super.c:	ntfs_debug("Entering.");
super.c:#ifdef NTFS_RW
super.c:		static const char *es3 = ".  Run ntfsfix and/or chkdsk.";
super.c:				ntfs_error(sb, "%s and neither on_errors="
super.c:			ntfs_error(sb, "%s.  Mounting read-only%s",
super.c:			ntfs_warning(sb, "%s.  Will not be able to remount "
super.c:#endif /* NTFS_RW */
super.c:	vol->mftbmp_ino = ntfs_attr_iget(vol->mft_ino, AT_BITMAP, NULL, 0);
super.c:		ntfs_error(sb, "Failed to load $MFT/$BITMAP attribute.");
super.c:	vol->lcnbmp_ino = ntfs_iget(sb, FILE_Bitmap);
super.c:		ntfs_error(sb, "Failed to load $Bitmap.");
super.c:	vol->vol_ino = ntfs_iget(sb, FILE_Volume);
super.c:		ntfs_error(sb, "Failed to load $Volume.");
super.c:	m = map_mft_record(NTFS_I(vol->vol_ino));
super.c:	if (!(ctx = get_attr_search_ctx(NTFS_I(vol->vol_ino), m))) {
super.c:		ntfs_error(sb, "Failed to get attribute search context.");
super.c:		unmap_mft_record(NTFS_I(vol->vol_ino));
super.c:	unmap_mft_record(NTFS_I(vol->vol_ino));
super.c:	printk(KERN_INFO "NTFS volume version %i.%i.\n", vol->major_ver,
super.c:#ifdef NTFS_RW
super.c:			!ntfs_is_logfile_clean(vol->logfile_ino)) {
super.c:				ntfs_error(sb, "%s and neither on_errors="
super.c:			ntfs_error(sb, "%s.  Mounting read-only%s",
super.c:			ntfs_warning(sb, "%s.  Will not be able to remount "
super.c:			!ntfs_empty_logfile(vol->logfile_ino)) {
super.c:			ntfs_error(sb, "%s and neither on_errors=continue nor "
super.c:		ntfs_error(sb, "%s.  Mounting read-only%s", es1, es2);
super.c:	tmp_ino = ntfs_iget(sb, FILE_AttrDef);
super.c:		ntfs_error(sb, "Failed to load $AttrDef.");
super.c:	vol->root_ino = ntfs_iget(sb, FILE_root);
super.c:		ntfs_error(sb, "Failed to load root directory.");
super.c:	/* If on NTFS versions before 3.0, we are done. */
super.c:	/* NTFS 3.0+ specific initialization. */
super.c:	vol->secure_ino = ntfs_iget(sb, FILE_Secure);
super.c:		ntfs_error(sb, "Failed to load $Secure.");
super.c:	tmp_ino = ntfs_iget(sb, FILE_Extend);
super.c:		ntfs_error(sb, "Failed to load $Extend.");
super.c:	// rather than using ntfs_iget here, as we don't know the inode number
super.c:#ifdef NTFS_RW
super.c:#endif /* NTFS_RW */
super.c:#ifdef NTFS_RW
super.c:#endif /* NTFS_RW */
super.c: * ntfs_put_super - called by the vfs to unmount a volume
super.c: * ntfs_put_super() is called by the VFS (from fs/super.c::do_umount()) when
super.c: * releases all inodes and memory belonging to the NTFS specific part of the
super.c:static void ntfs_put_super(struct super_block *vfs_sb)
super.c:	ntfs_volume *vol = NTFS_SB(vfs_sb);
super.c:	ntfs_debug("Entering.");
super.c:	/* NTFS 3.0+ specific clean up. */
super.c:#ifdef NTFS_RW
super.c:#endif /* NTFS_RW */
super.c:	down(&ntfs_lock);
super.c:	ntfs_nr_mounts--;
super.c:		ntfs_nr_upcase_users--;
super.c:	if (!ntfs_nr_upcase_users && default_upcase) {
super.c:		ntfs_free(default_upcase);
super.c:	if (vol->cluster_size <= 4096 && !--ntfs_nr_compression_users)
super.c:	up(&ntfs_lock);
super.c:		ntfs_free(vol->upcase);
super.c: * @vol:	ntfs volume for which to obtain free cluster count
super.c: * Calculate the number of free clusters on the mounted NTFS volume @vol. We
super.c: * The only particularity is that clusters beyond the end of the logical ntfs
super.c:static s64 get_nr_free_clusters(ntfs_volume *vol)
super.c:	ntfs_debug("Entering.");
super.c:	ntfs_debug("Reading $Bitmap, max_index = 0x%lx, max_size = 0x%x.",
super.c:			ntfs_debug("Sync read_cache_page() error. Skipping "
super.c:			ntfs_debug("Async read_cache_page() error. Skipping "
super.c:		 * ntfs_readpage().
super.c:	ntfs_debug("Finished reading $Bitmap, last index = 0x%lx.", index - 1);
super.c:	 * Fixup for eventual bits outside logical ntfs volume (see function
super.c:	ntfs_debug("Exiting.");
super.c: * @vol:	ntfs volume for which to obtain free inode count
super.c: * Calculate the number of free mft records (inodes) on the mounted NTFS
super.c:static unsigned long __get_nr_free_mft_records(ntfs_volume *vol)
super.c:	ntfs_debug("Entering.");
super.c:	ntfs_debug("Reading $MFT/$BITMAP, max_index = 0x%lx, max_size = "
super.c:			ntfs_debug("Sync read_cache_page() error. Skipping "
super.c:			ntfs_debug("Async read_cache_page() error. Skipping "
super.c:		 * ntfs_readpage().
super.c:	ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx.",
super.c:	ntfs_debug("Exiting.");
super.c: * ntfs_statfs - return information about mounted NTFS volume
super.c: * Return information about the mounted NTFS volume @sb in the statfs structure
super.c: * pointed to by @sfs (this is initialized with zeros before ntfs_statfs is
super.c:static int ntfs_statfs(struct super_block *sb, struct kstatfs *sfs)
super.c:	ntfs_volume *vol = NTFS_SB(sb);
super.c:	ntfs_debug("Entering.");
super.c:	sfs->f_type   = NTFS_SB_MAGIC;
super.c:	/* Free blocks avail to non-superuser, same as above on NTFS. */
super.c:	sfs->f_namelen	   = NTFS_MAX_NAME_LEN;
super.c:struct super_operations ntfs_mount_sops = {
super.c:	.alloc_inode	= ntfs_alloc_big_inode,	  /* VFS: Allocate new inode. */
super.c:	.destroy_inode	= ntfs_destroy_big_inode, /* VFS: Deallocate inode. */
super.c:	.read_inode	= ntfs_read_inode_mount,  /* VFS: Load inode from disk,
super.c:	.clear_inode	= ntfs_clear_big_inode,	  /* VFS: Called when inode is
super.c:struct super_operations ntfs_sops = {
super.c:	.alloc_inode	= ntfs_alloc_big_inode,	  /* VFS: Allocate new inode. */
super.c:	.destroy_inode	= ntfs_destroy_big_inode, /* VFS: Deallocate inode. */
super.c:	.put_inode	= ntfs_put_inode,	  /* VFS: Called just before
super.c:#ifdef NTFS_RW
super.c:#endif /* NTFS_RW */
super.c:	.put_super	= ntfs_put_super,	/* Syscall: umount. */
super.c:	.statfs		= ntfs_statfs,		/* Syscall: statfs */
super.c:	.remount_fs	= ntfs_remount,		/* Syscall: mount -o remount. */
super.c:	.clear_inode	= ntfs_clear_big_inode,	/* VFS: Called when an inode is
super.c:	.show_options	= ntfs_show_options,	/* Show mount options in
super.c: * Declarations for NTFS specific export operations (fs/ntfs/namei.c).
super.c:extern struct dentry *ntfs_get_parent(struct dentry *child_dent);
super.c:extern struct dentry *ntfs_get_dentry(struct super_block *sb, void *fh);
super.c: * Export operations allowing NFS exporting of mounted NTFS partitions.
super.c: * own and the default ->get_dentry() is incompatible with NTFS due to not
super.c: * allowing the inode number 0 which is used in NTFS for the system file $MFT
super.c: * and due to using iget() whereas NTFS needs ntfs_iget().
super.c:static struct export_operations ntfs_export_ops = {
super.c:	.get_parent	= ntfs_get_parent,	/* Find the parent of a given
super.c:	.get_dentry	= ntfs_get_dentry,	/* Find a dentry for the inode
super.c: * ntfs_fill_super - mount an ntfs files system
super.c: * @sb:		super block of ntfs file system to mount
super.c: * ntfs_fill_super() is called by the VFS to mount the device described by @sb
super.c: * with the mount otions in @data with the NTFS file system.
super.c:static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent)
super.c:	ntfs_volume *vol;
super.c:	ntfs_debug("Entering.");
super.c:#ifndef NTFS_RW
super.c:	/* Allocate a new ntfs_volume and place it in sb->s_fs_info. */
super.c:	sb->s_fs_info = kmalloc(sizeof(ntfs_volume), GFP_NOFS);
super.c:	vol = NTFS_SB(sb);
super.c:			ntfs_error(sb, "Allocation of NTFS volume structure "
super.c:	/* Initialize ntfs_volume structure. */
super.c:	memset(vol, 0, sizeof(ntfs_volume));
super.c:#ifdef NTFS_RW
super.c:#endif /* NTFS_RW */
super.c:	if (bdev_hardsect_size(sb->s_bdev) > NTFS_BLOCK_SIZE) {
super.c:			ntfs_error(sb, "Device has unsupported hardsect_size.");
super.c:	/* Setup the device access block size to NTFS_BLOCK_SIZE. */
super.c:	if (sb_set_blocksize(sb, NTFS_BLOCK_SIZE) != NTFS_BLOCK_SIZE) {
super.c:			ntfs_error(sb, "Unable to set block size.");
super.c:	/* Get the size of the device in units of NTFS_BLOCK_SIZE bytes. */
super.c:	vol->nr_blocks = sb->s_bdev->bd_inode->i_size >> NTFS_BLOCK_SIZE_BITS;
super.c:	if (!(bh = read_ntfs_boot_sector(sb, silent))) {
super.c:			ntfs_error(sb, "Not an NTFS volume.");
super.c:	 * Extract the data from the boot sector and setup the ntfs super block
super.c:	result = parse_ntfs_boot_sector(vol, (NTFS_BOOT_SECTOR*)bh->b_data);
super.c:			ntfs_error(sb, "Unsupported NTFS filesystem.");
super.c:	 * NTFS_BLOCK_SIZE, we now probably need to set the blocksize of the
super.c:	 * device (probably to NTFS_BLOCK_SIZE).
super.c:	sb->s_magic = NTFS_SB_MAGIC;
super.c:	 * Ntfs allows 63 bits for the file size, i.e. correct would be:
super.c:	 * ntfs_read_inode_mount() method.
super.c:	sb->s_op = &ntfs_mount_sops;
super.c:			ntfs_error(sb, "Failed to load essential metadata.");
super.c:			ntfs_error(sb, "BUG: iget() did not call "
super.c:					"ntfs_read_inode_mount() method!\n");
super.c:	 * Note: sb->s_op has already been set to &ntfs_sops by our specialized
super.c:	 * ntfs_read_inode_mount() method when it was invoked by iget().
super.c:	down(&ntfs_lock);
super.c:	if (vol->cluster_size <= 4096 && !ntfs_nr_compression_users++) {
super.c:			ntfs_error(NULL, "Failed to allocate buffers "
super.c:			ntfs_nr_compression_users--;
super.c:			up(&ntfs_lock);
super.c:	if (!ntfs_nr_mounts++)
super.c:	ntfs_nr_upcase_users++;
super.c:	up(&ntfs_lock);
super.c:	 * setting up the ntfs super block.
super.c:		ntfs_error(sb, "Failed to load system files.");
super.c:		/* We increment i_count simulating an ntfs_iget(). */
super.c:		ntfs_debug("Exiting, status successful.");
super.c:		down(&ntfs_lock);
super.c:		if (!--ntfs_nr_upcase_users && default_upcase) {
super.c:			ntfs_free(default_upcase);
super.c:		up(&ntfs_lock);
super.c:		sb->s_export_op = &ntfs_export_ops;
super.c:	ntfs_error(sb, "Failed to allocate root directory.");
super.c:	/* NTFS 3.0+ specific clean up. */
super.c:#ifdef NTFS_RW
super.c:#endif /* NTFS_RW */
super.c:		ntfs_free(vol->upcase);
super.c:	down(&ntfs_lock);
super.c:	ntfs_nr_mounts--;
super.c:	if (!--ntfs_nr_upcase_users && default_upcase) {
super.c:		ntfs_free(default_upcase);
super.c:	if (vol->cluster_size <= 4096 && !--ntfs_nr_compression_users)
super.c:	up(&ntfs_lock);
super.c:	 * This is needed to get ntfs_clear_extent_inode() called for each
super.c:	 * inode we have ever called ntfs_iget()/iput() on, otherwise we A)
super.c:	 * ntfs_iget() never calling down into our ntfs_read_locked_inode()
super.c:		ntfs_error(sb, "Busy inodes left. This is most likely a NTFS "
super.c:		printk("NTFS: Busy inodes after umount. Self-destruct in 5 "
super.c:	ntfs_debug("Failed, returning -EINVAL.");
super.c: * strings of the maximum length allowed by NTFS, which is NTFS_MAX_NAME_LEN
super.c:kmem_cache_t *ntfs_name_cache;
super.c:kmem_cache_t *ntfs_inode_cache;
super.c:kmem_cache_t *ntfs_big_inode_cache;
super.c:static void ntfs_big_inode_init_once(void *foo, kmem_cache_t *cachep,
super.c:	ntfs_inode *ni = (ntfs_inode *)foo;
super.c:kmem_cache_t *ntfs_attr_ctx_cache;
super.c:unsigned long ntfs_nr_upcase_users = 0;
super.c:unsigned long ntfs_nr_mounts = 0;
super.c:DECLARE_MUTEX(ntfs_lock);
super.c:static struct super_block *ntfs_get_sb(struct file_system_type *fs_type,
super.c:	return get_sb_bdev(fs_type, flags, dev_name, data, ntfs_fill_super);
super.c:static struct file_system_type ntfs_fs_type = {
super.c:	.name		= "ntfs",
super.c:	.get_sb		= ntfs_get_sb,
super.c:static const char ntfs_attr_ctx_cache_name[] = "ntfs_attr_ctx_cache";
super.c:static const char ntfs_name_cache_name[] = "ntfs_name_cache";
super.c:static const char ntfs_inode_cache_name[] = "ntfs_inode_cache";
super.c:static const char ntfs_big_inode_cache_name[] = "ntfs_big_inode_cache";
super.c:static int __init init_ntfs_fs(void)
super.c:	printk(KERN_INFO "NTFS driver " NTFS_VERSION " [Flags: R/"
super.c:#ifdef NTFS_RW
super.c:	ntfs_debug("Debug messages are enabled.");
super.c:	ntfs_attr_ctx_cache = kmem_cache_create(ntfs_attr_ctx_cache_name,
super.c:	if (!ntfs_attr_ctx_cache) {
super.c:		printk(KERN_CRIT "NTFS: Failed to create %s!\n",
super.c:				ntfs_attr_ctx_cache_name);
super.c:	ntfs_name_cache = kmem_cache_create(ntfs_name_cache_name,
super.c:			(NTFS_MAX_NAME_LEN+1) * sizeof(uchar_t), 0,
super.c:	if (!ntfs_name_cache) {
super.c:		printk(KERN_CRIT "NTFS: Failed to create %s!\n",
super.c:				ntfs_name_cache_name);
super.c:	ntfs_inode_cache = kmem_cache_create(ntfs_inode_cache_name,
super.c:			sizeof(ntfs_inode), 0,
super.c:	if (!ntfs_inode_cache) {
super.c:		printk(KERN_CRIT "NTFS: Failed to create %s!\n",
super.c:				ntfs_inode_cache_name);
super.c:	ntfs_big_inode_cache = kmem_cache_create(ntfs_big_inode_cache_name,
super.c:			sizeof(big_ntfs_inode), 0,
super.c:			ntfs_big_inode_init_once, NULL);
super.c:	if (!ntfs_big_inode_cache) {
super.c:		printk(KERN_CRIT "NTFS: Failed to create %s!\n",
super.c:				ntfs_big_inode_cache_name);
super.c:	/* Register the ntfs sysctls. */
super.c:	err = ntfs_sysctl(1);
super.c:		printk(KERN_CRIT "NTFS: Failed to register NTFS sysctls!\n");
super.c:	err = register_filesystem(&ntfs_fs_type);
super.c:		ntfs_debug("NTFS driver registered successfully.");
super.c:	printk(KERN_CRIT "NTFS: Failed to register NTFS file system driver!\n");
super.c:	kmem_cache_destroy(ntfs_big_inode_cache);
super.c:	kmem_cache_destroy(ntfs_inode_cache);
super.c:	kmem_cache_destroy(ntfs_name_cache);
super.c:	kmem_cache_destroy(ntfs_attr_ctx_cache);
super.c:		printk(KERN_CRIT "NTFS: Aborting NTFS file system driver "
super.c:static void __exit exit_ntfs_fs(void)
super.c:	ntfs_debug("Unregistering NTFS driver.");
super.c:	unregister_filesystem(&ntfs_fs_type);
super.c:	if (kmem_cache_destroy(ntfs_big_inode_cache) && (err = 1))
super.c:		printk(KERN_CRIT "NTFS: Failed to destory %s.\n",
super.c:				ntfs_big_inode_cache_name);
super.c:	if (kmem_cache_destroy(ntfs_inode_cache) && (err = 1))
super.c:		printk(KERN_CRIT "NTFS: Failed to destory %s.\n",
super.c:				ntfs_inode_cache_name);
super.c:	if (kmem_cache_destroy(ntfs_name_cache) && (err = 1))
super.c:		printk(KERN_CRIT "NTFS: Failed to destory %s.\n",
super.c:				ntfs_name_cache_name);
super.c:	if (kmem_cache_destroy(ntfs_attr_ctx_cache) && (err = 1))
super.c:		printk(KERN_CRIT "NTFS: Failed to destory %s.\n",
super.c:				ntfs_attr_ctx_cache_name);
super.c:		printk(KERN_CRIT "NTFS: This causes memory to leak! There is "
super.c:				"linux-ntfs-dev@lists.sourceforge.net\n");
super.c:	/* Unregister the ntfs sysctls. */
super.c:	ntfs_sysctl(0);
super.c:MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2004 Anton Altaparmakov");
super.c:module_init(init_ntfs_fs)
super.c:module_exit(exit_ntfs_fs)
Binary file super.o matches
sysctl.c: * sysctl.c - Code for sysctl handling in NTFS Linux kernel driver. Part of
sysctl.c: *	      the Linux-NTFS project. Adapted from the old NTFS driver,
sysctl.c: * along with this program (in the main directory of the Linux-NTFS 
sysctl.c:#define FS_NTFS	1
sysctl.c:/* Definition of the ntfs sysctl. */
sysctl.c:static ctl_table ntfs_sysctls[] = {
sysctl.c:	{ FS_NTFS, "ntfs-debug", 		/* Binary and text IDs. */
sysctl.c:	{ CTL_FS, "fs", NULL, 0, 0555, ntfs_sysctls },
sysctl.c: * ntfs_sysctl - add or remove the debug sysctl
sysctl.c:int ntfs_sysctl(int add)
sysctl.c:		ntfs_sysctls[0].de->owner = THIS_MODULE;
sysctl.h: * sysctl.h - Defines for sysctl handling in NTFS Linux kernel driver. Part of
sysctl.h: *	      the Linux-NTFS project. Adapted from the old NTFS driver,
sysctl.h: * along with this program (in the main directory of the Linux-NTFS 
sysctl.h:#ifndef _LINUX_NTFS_SYSCTL_H
sysctl.h:#define _LINUX_NTFS_SYSCTL_H
sysctl.h:extern int ntfs_sysctl(int add);
sysctl.h:static inline int ntfs_sysctl(int add)
sysctl.h:#endif /* _LINUX_NTFS_SYSCTL_H */
time.h: * time.h - NTFS time conversion functions.  Part of the Linux-NTFS project.
time.h: * along with this program (in the main directory of the Linux-NTFS
time.h:#ifndef _LINUX_NTFS_TIME_H
time.h:#define _LINUX_NTFS_TIME_H
time.h:#define NTFS_TIME_OFFSET ((s64)(369 * 365 + 89) * 24 * 3600 * 10000000)
time.h: * utc2ntfs - convert Linux UTC time to NTFS time
time.h: * @ts:		Linux UTC time to convert to NTFS time
time.h: * Convert the Linux UTC time @ts to its corresponding NTFS time and return
time.h: * NTFS uses Microsoft's standard time format which is stored in a s64 and is
time.h:static inline s64 utc2ntfs(const struct timespec ts)
time.h:	 * converted to 100ns intervals, and then add the NTFS time offset.
time.h:			NTFS_TIME_OFFSET);
time.h: * get_current_ntfs_time - get the current time in little endian NTFS format
time.h: * NTFS time and return that in little endian format.
time.h:static inline s64 get_current_ntfs_time(void)
time.h:	return utc2ntfs(current_kernel_time());
time.h: * ntfs2utc - convert NTFS time to Linux time
time.h: * @time:	NTFS time (little endian) to convert to Linux UTC
time.h: * Convert the little endian NTFS time @time to its corresponding Linux UTC
time.h: * NTFS uses Microsoft's standard time format which is stored in a s64 and is
time.h:static inline struct timespec ntfs2utc(const s64 time)
time.h:	/* Subtract the NTFS time offset. */
time.h:	s64 t = sle64_to_cpu(time) - NTFS_TIME_OFFSET;
time.h:#endif /* _LINUX_NTFS_TIME_H */
types.h: * types.h - Defines for NTFS Linux kernel driver specific types.
types.h: *	     Part of the Linux-NTFS project.
types.h: * along with this program (in the main directory of the Linux-NTFS
types.h:#ifndef _LINUX_NTFS_TYPES_H
types.h:#define _LINUX_NTFS_TYPES_H
types.h: * Clusters are signed 64-bit values on NTFS volumes. We define two types, LCN
types.h: * The NTFS journal $LogFile uses log sequence numbers which are signed 64-bit
types.h:#endif /* _LINUX_NTFS_TYPES_H */
unistr.c: * unistr.c - NTFS Unicode string handling. Part of the Linux-NTFS project.
unistr.c: * along with this program (in the main directory of the Linux-NTFS 
unistr.c:#include "ntfs.h"
unistr.c: * ntfs_are_names_equal - compare two Unicode names for equality
unistr.c:BOOL ntfs_are_names_equal(const uchar_t *s1, size_t s1_len,
unistr.c:		return !ntfs_ucsncmp(s1, s2, s1_len);
unistr.c:	return !ntfs_ucsncasecmp(s1, s2, s1_len, upcase, upcase_size);
unistr.c: * ntfs_collate_names - collate two Unicode names
unistr.c: * ntfs_collate_names collates two Unicode names and returns:
unistr.c:int ntfs_collate_names(const uchar_t *name1, const u32 name1_len,
unistr.c: * ntfs_ucsncmp - compare two little endian Unicode strings
unistr.c:int ntfs_ucsncmp(const uchar_t *s1, const uchar_t *s2, size_t n)
unistr.c: * ntfs_ucsncasecmp - compare two little endian Unicode strings, ignoring case
unistr.c:int ntfs_ucsncasecmp(const uchar_t *s1, const uchar_t *s2, size_t n,
unistr.c:void ntfs_upcase_name(uchar_t *name, u32 name_len, const uchar_t *upcase,
unistr.c:void ntfs_file_upcase_value(FILE_NAME_ATTR *file_name_attr,
unistr.c:	ntfs_upcase_name((uchar_t*)&file_name_attr->file_name,
unistr.c:int ntfs_file_compare_values(FILE_NAME_ATTR *file_name_attr1,
unistr.c:	return ntfs_collate_names((uchar_t*)&file_name_attr1->file_name,
unistr.c: * ntfs_nlstoucs - convert NLS string to little endian Unicode string
unistr.c: * @vol:	ntfs volume which we are working with
unistr.c: * calling kmem_cache_free(ntfs_name_cache, @outs); when finished with it.
unistr.c:int ntfs_nlstoucs(const ntfs_volume *vol, const char *ins,
unistr.c:		ucs = (uchar_t*)kmem_cache_alloc(ntfs_name_cache, SLAB_NOFS);
unistr.c:		ntfs_error(vol->sb, "Failed to allocate name from "
unistr.c:				"ntfs_name_cache!");
unistr.c:	ntfs_error(NULL, "Received NULL pointer.");
unistr.c:	ntfs_error(vol->sb, "Name using character set %s contains characters "
unistr.c:	kmem_cache_free(ntfs_name_cache, ucs);
unistr.c: * ntfs_ucstonls - convert little endian Unicode string to NLS string
unistr.c: * @vol:	ntfs volume which we are working with
unistr.c:int ntfs_ucstonls(const ntfs_volume *vol, const uchar_t *ins,
unistr.c:	ntfs_error(vol->sb, "Received NULL pointer.");
unistr.c:	ntfs_error(vol->sb, "Unicode name contains characters that cannot be "
unistr.c:	ntfs_error(vol->sb, "Failed to allocate name!");
Binary file unistr.o matches
upcase.c: * upcase.c - Generate the full NTFS Unicode upcase table in little endian.
upcase.c: *	      Part of the Linux-NTFS project.
upcase.c: * Copyright (c) 2001 Richard Russon <ntfs@flatcap.org>
upcase.c: * Modified for mkntfs inclusion 9 June 2001 by Anton Altaparmakov.
upcase.c: * along with this program (in the main directory of the Linux-NTFS source
upcase.c:#include "ntfs.h"
upcase.c:	uc = ntfs_malloc_nofs(default_upcase_len * sizeof(uchar_t));
volume.h: * volume.h - Defines for volume structures in NTFS Linux kernel driver. Part
volume.h: *	      of the Linux-NTFS project.
volume.h: * along with this program (in the main directory of the Linux-NTFS
volume.h:#ifndef _LINUX_NTFS_VOLUME_H
volume.h:#define _LINUX_NTFS_VOLUME_H
volume.h: * The NTFS in memory super block structure.
volume.h:	LCN nr_blocks;			/* Number of NTFS_BLOCK_SIZE bytes
volume.h:	/* NTFS bootsector provided information. */
volume.h:	/* Mount specific NTFS information. */
volume.h:#ifdef NTFS_RW
volume.h:#endif /* NTFS_RW */
volume.h:	u8 major_ver;			/* Ntfs major version of volume. */
volume.h:	u8 minor_ver;			/* Ntfs minor version of volume. */
volume.h:	struct inode *secure_ino;	/* The VFS inode of $Secure (NTFS3.0+
volume.h:} ntfs_volume;
volume.h: * Defined bits for the flags field in the ntfs_volume structure.
volume.h:	NV_ShowSystemFiles,	/* 1: Return system files in ntfs_readdir(). */
volume.h:} ntfs_volume_flags;
volume.h:static inline int NVol##flag(ntfs_volume *vol)		\
volume.h:static inline void NVolSet##flag(ntfs_volume *vol)	\
volume.h:static inline void NVolClear##flag(ntfs_volume *vol)	\
volume.h:/* Emit the ntfs volume bitops functions. */
volume.h:#endif /* _LINUX_NTFS_VOLUME_H */
