Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
fs
ntfs
index.h
Go to the documentation of this file.
1
/*
2
* index.h - Defines for NTFS kernel index handling. Part of the Linux-NTFS
3
* project.
4
*
5
* Copyright (c) 2004 Anton Altaparmakov
6
*
7
* This program/include file is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License as published
9
* by the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* This program/include file is distributed in the hope that it will be
13
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
14
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program (in the main directory of the Linux-NTFS
19
* distribution in the file COPYING); if not, write to the Free Software
20
* Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
*/
22
23
#ifndef _LINUX_NTFS_INDEX_H
24
#define _LINUX_NTFS_INDEX_H
25
26
#include <linux/fs.h>
27
28
#include "
types.h
"
29
#include "
layout.h
"
30
#include "
inode.h
"
31
#include "
attrib.h
"
32
#include "
mft.h
"
33
#include "
aops.h
"
34
75
typedef
struct
{
76
ntfs_inode
*
idx_ni
;
77
INDEX_ENTRY *
entry
;
78
void
*
data
;
79
u16
data_len
;
80
bool
is_in_root
;
81
INDEX_ROOT *
ir
;
82
ntfs_attr_search_ctx
*
actx
;
83
ntfs_inode
*
base_ni
;
84
INDEX_ALLOCATION
*
ia
;
85
struct
page
*
page
;
86
}
ntfs_index_context
;
87
88
extern
ntfs_index_context
*
ntfs_index_ctx_get
(
ntfs_inode
*idx_ni);
89
extern
void
ntfs_index_ctx_put
(
ntfs_index_context
*ictx);
90
91
extern
int
ntfs_index_lookup
(
const
void
*
key
,
const
int
key_len
,
92
ntfs_index_context
*ictx);
93
94
#ifdef NTFS_RW
95
111
static
inline
void
ntfs_index_entry_flush_dcache_page(
ntfs_index_context
*ictx)
112
{
113
if
(ictx->
is_in_root
)
114
flush_dcache_mft_record_page(ictx->
actx
->
ntfs_ino
);
115
else
116
flush_dcache_page
(ictx->
page
);
117
}
118
137
static
inline
void
ntfs_index_entry_mark_dirty(
ntfs_index_context
*ictx)
138
{
139
if
(ictx->
is_in_root
)
140
mark_mft_record_dirty(ictx->
actx
->
ntfs_ino
);
141
else
142
mark_ntfs_record_dirty(ictx->
page
,
143
(
u8
*)ictx->
ia
- (
u8
*)
page_address
(ictx->
page
));
144
}
145
146
#endif
/* NTFS_RW */
147
148
#endif
/* _LINUX_NTFS_INDEX_H */
Generated on Thu Jan 10 2013 14:49:14 for Linux Kernel by
1.8.2