Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2d4d6186
Commit
2d4d6186
authored
Jul 04, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linux-ntfs.bkbits.net/ntfs-tng-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
e21a85a7
1d209b00
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
514 additions
and
357 deletions
+514
-357
Documentation/filesystems/ntfs.txt
Documentation/filesystems/ntfs.txt
+3
-0
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+11
-0
fs/ntfs/Makefile
fs/ntfs/Makefile
+1
-1
fs/ntfs/attrib.c
fs/ntfs/attrib.c
+487
-346
fs/ntfs/mst.c
fs/ntfs/mst.c
+2
-2
fs/ntfs/super.c
fs/ntfs/super.c
+10
-8
No files found.
Documentation/filesystems/ntfs.txt
View file @
2d4d6186
...
...
@@ -247,6 +247,9 @@ ChangeLog
Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
2.0.14:
- Internal changes improving run list merging code and minor locking
change to not rely on BKL in ntfs_statfs().
2.0.13:
- Internal changes towards using iget5_locked() in preparation for
fake inodes and small cleanups to ntfs_volume structure.
...
...
fs/ntfs/ChangeLog
View file @
2d4d6186
...
...
@@ -28,6 +28,17 @@ ToDo:
- Enable NFS exporting of NTFS.
- Use fake inodes for address space i/o.
2.0.14 - Run list merging code cleanup, minor locking changes, typo fixes.
- Change fs/ntfs/super.c::ntfs_statfs() to not rely on BKL by moving
the locking out of super.c::get_nr_free_mft_records() and taking and
dropping the mftbmp_lock rw_semaphore in ntfs_statfs() itself.
- Bring attribute run list merging code (fs/ntfs/attrib.c) in sync with
current userspace ntfs library code. This means that if a merge
fails the original run lists are always left unmodified instead of
being silently corrupted.
- Misc typo fixes.
2.0.13 - Use iget5_locked() in preparation for fake inodes and small cleanups.
- Remove nr_mft_bits and the now superfluous union with nr_mft_records
...
...
fs/ntfs/Makefile
View file @
2d4d6186
...
...
@@ -5,7 +5,7 @@ obj-$(CONFIG_NTFS_FS) += ntfs.o
ntfs-objs
:=
aops.o attrib.o compress.o debug.o dir.o file.o inode.o mft.o
\
mst.o namei.o super.o sysctl.o time.o unistr.o upcase.o
EXTRA_CFLAGS
=
-DNTFS_VERSION
=
\"
2.0.1
3
\"
EXTRA_CFLAGS
=
-DNTFS_VERSION
=
\"
2.0.1
4
\"
ifeq
($(CONFIG_NTFS_DEBUG),y)
EXTRA_CFLAGS
+=
-DDEBUG
...
...
fs/ntfs/attrib.c
View file @
2d4d6186
This diff is collapsed.
Click to expand it.
fs/ntfs/mst.c
View file @
2d4d6186
...
...
@@ -48,7 +48,7 @@ int post_read_mst_fixup(NTFS_RECORD *b, const u32 size)
usa_ofs
=
le16_to_cpu
(
b
->
usa_ofs
);
/* Decrement usa_count to get number of fixups. */
usa_count
=
le16_to_cpu
(
b
->
usa_count
)
-
1
;
/* Size and align
e
ment checks. */
/* Size and alignment checks. */
if
(
size
&
(
NTFS_BLOCK_SIZE
-
1
)
||
usa_ofs
&
1
||
usa_ofs
+
(
usa_count
*
2
)
>
size
||
...
...
@@ -132,7 +132,7 @@ int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size)
usa_ofs
=
le16_to_cpu
(
b
->
usa_ofs
);
/* Decrement usa_count to get number of fixups. */
usa_count
=
le16_to_cpu
(
b
->
usa_count
)
-
1
;
/* Size and align
e
ment checks. */
/* Size and alignment checks. */
if
(
size
&
(
NTFS_BLOCK_SIZE
-
1
)
||
usa_ofs
&
1
||
usa_ofs
+
(
usa_count
*
2
)
>
size
||
...
...
fs/ntfs/super.c
View file @
2d4d6186
...
...
@@ -1077,7 +1077,7 @@ static BOOL load_system_files(ntfs_volume *vol)
* releases all inodes and memory belonging to the NTFS specific part of the
* super block.
*/
void
ntfs_put_super
(
struct
super_block
*
vfs_sb
)
static
void
ntfs_put_super
(
struct
super_block
*
vfs_sb
)
{
ntfs_volume
*
vol
=
NTFS_SB
(
vfs_sb
);
...
...
@@ -1155,7 +1155,7 @@ void ntfs_put_super(struct super_block *vfs_sb)
* Errors are ignored and we just return the number of free clusters we have
* found. This means we return an underestimate on error.
*/
s64
get_nr_free_clusters
(
ntfs_volume
*
vol
)
s
tatic
s
64
get_nr_free_clusters
(
ntfs_volume
*
vol
)
{
struct
address_space
*
mapping
=
vol
->
lcnbmp_ino
->
i_mapping
;
filler_t
*
readpage
=
(
filler_t
*
)
mapping
->
a_ops
->
readpage
;
...
...
@@ -1227,7 +1227,7 @@ s64 get_nr_free_clusters(ntfs_volume *vol)
}
/**
* get_nr_free_mft_records - return the number of free inodes on a volume
*
__
get_nr_free_mft_records - return the number of free inodes on a volume
* @vol: ntfs volume for which to obtain free inode count
*
* Calculate the number of free mft records (inodes) on the mounted NTFS
...
...
@@ -1235,8 +1235,10 @@ s64 get_nr_free_clusters(ntfs_volume *vol)
*
* Errors are ignored and we just return the number of free inodes we have
* found. This means we return an underestimate on error.
*
* NOTE: Caller must hold mftbmp_lock rw_semaphore for reading or writing.
*/
unsigned
long
get_nr_free_mft_records
(
ntfs_volume
*
vol
)
static
unsigned
long
__
get_nr_free_mft_records
(
ntfs_volume
*
vol
)
{
struct
address_space
*
mapping
;
filler_t
*
readpage
;
...
...
@@ -1247,7 +1249,6 @@ unsigned long get_nr_free_mft_records(ntfs_volume *vol)
ntfs_debug
(
"Entering."
);
/* Serialize accesses to the inode bitmap. */
down_read
(
&
vol
->
mftbmp_lock
);
mapping
=
&
vol
->
mftbmp_mapping
;
readpage
=
(
filler_t
*
)
mapping
->
a_ops
->
readpage
;
/*
...
...
@@ -1307,7 +1308,6 @@ unsigned long get_nr_free_mft_records(ntfs_volume *vol)
}
ntfs_debug
(
"Finished reading $MFT/$BITMAP, last index = 0x%lx"
,
index
-
1
);
up_read
(
&
vol
->
mftbmp_lock
);
ntfs_debug
(
"Exiting."
);
return
nr_free
;
}
...
...
@@ -1330,7 +1330,7 @@ unsigned long get_nr_free_mft_records(ntfs_volume *vol)
*
* Return 0 on success or -errno on error.
*/
int
ntfs_statfs
(
struct
super_block
*
sb
,
struct
statfs
*
sfs
)
static
int
ntfs_statfs
(
struct
super_block
*
sb
,
struct
statfs
*
sfs
)
{
ntfs_volume
*
vol
=
NTFS_SB
(
sb
);
s64
size
;
...
...
@@ -1354,10 +1354,12 @@ int ntfs_statfs(struct super_block *sb, struct statfs *sfs)
size
=
0LL
;
/* Free blocks avail to non-superuser, same as above on NTFS. */
sfs
->
f_bavail
=
sfs
->
f_bfree
=
size
;
down_read
(
&
vol
->
mftbmp_lock
);
/* Total file nodes in file system (at this moment in time). */
sfs
->
f_files
=
vol
->
mft_ino
->
i_size
>>
vol
->
mft_record_size_bits
;
/* Free file nodes in fs (based on current total count). */
sfs
->
f_ffree
=
get_nr_free_mft_records
(
vol
);
sfs
->
f_ffree
=
__get_nr_free_mft_records
(
vol
);
up_read
(
&
vol
->
mftbmp_lock
);
/*
* File system id. This is extremely *nix flavour dependent and even
* within Linux itself all fs do their own thing. I interpret this to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment