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
6631c357
Commit
6631c357
authored
Oct 25, 2004
by
Anton Altaparmakov
Browse files
Options
Browse Files
Download
Plain Diff
Merge
ssh://linux-ntfs@bkbits.net/ntfs-2.6-devel
into cantab.net:/home/src/ntfs-2.6-devel
parents
98000ebc
3cde4635
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
23 deletions
+36
-23
Documentation/filesystems/ntfs.txt
Documentation/filesystems/ntfs.txt
+2
-2
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+4
-0
fs/ntfs/Makefile
fs/ntfs/Makefile
+1
-1
fs/ntfs/inode.c
fs/ntfs/inode.c
+29
-20
No files found.
Documentation/filesystems/ntfs.txt
View file @
6631c357
...
...
@@ -258,10 +258,10 @@ Then you would use ldminfo in dump mode to obtain the necessary information:
$ ./ldminfo --dump /dev/hda
This would dump the LDM database found on /dev/hda which describes all of your
d
i
namic disks and all the volumes on them. At the bottom you will see the
d
y
namic disks and all the volumes on them. At the bottom you will see the
VOLUME DEFINITIONS section which is all you really need. You may need to look
further above to determine which of the disks in the volume definitions is
which device in Linux. Hint: Run ldminfo on each of your d
i
namic disks and
which device in Linux. Hint: Run ldminfo on each of your d
y
namic disks and
look at the Disk Id close to the top of the output for each (the PRIVATE HEADER
section). You can then find these Disk Ids in the VBLK DATABASE section in the
<Disk> components where you will get the LDM Name for the disk that is found in
...
...
fs/ntfs/ChangeLog
View file @
6631c357
...
...
@@ -21,6 +21,10 @@ ToDo/Notes:
- Enable the code for setting the NT4 compatibility flag when we start
making NTFS 1.2 specific modifications.
2.1.22-WIP
- Improve error handling in fs/ntfs/inode.c::ntfs_truncate().
2.1.21 - Fix some races and bugs, rewrite mft write code, add mft allocator.
- Implement extent mft record deallocation
...
...
fs/ntfs/Makefile
View file @
6631c357
...
...
@@ -6,7 +6,7 @@ ntfs-objs := aops.o attrib.o collate.o compress.o debug.o dir.o file.o \
index.o inode.o mft.o mst.o namei.o runlist.o super.o sysctl.o
\
unistr.o upcase.o
EXTRA_CFLAGS
=
-DNTFS_VERSION
=
\"
2.1.2
1
\"
EXTRA_CFLAGS
=
-DNTFS_VERSION
=
\"
2.1.2
2-WIP
\"
ifeq
($(CONFIG_NTFS_DEBUG),y)
EXTRA_CFLAGS
+=
-DDEBUG
...
...
fs/ntfs/inode.c
View file @
6631c357
...
...
@@ -2272,58 +2272,67 @@ int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt)
void
ntfs_truncate
(
struct
inode
*
vi
)
{
ntfs_inode
*
ni
=
NTFS_I
(
vi
);
ntfs_volume
*
vol
=
ni
->
vol
;
ntfs_attr_search_ctx
*
ctx
;
MFT_RECORD
*
m
;
const
char
*
te
=
" Leaving file length out of sync with i_size."
;
int
err
;
ntfs_debug
(
"Entering for inode 0x%lx."
,
vi
->
i_ino
);
BUG_ON
(
NInoAttr
(
ni
));
BUG_ON
(
ni
->
nr_extents
<
0
);
m
=
map_mft_record
(
ni
);
if
(
IS_ERR
(
m
))
{
err
=
PTR_ERR
(
m
);
ntfs_error
(
vi
->
i_sb
,
"Failed to map mft record for inode 0x%lx "
"(error code %
ld)."
,
vi
->
i_ino
,
PTR_ERR
(
m
)
);
if
(
PTR_ERR
(
m
)
!=
ENOMEM
)
make_bad_inode
(
vi
)
;
return
;
"(error code %
d).%s"
,
vi
->
i_ino
,
err
,
te
);
ctx
=
NULL
;
m
=
NULL
;
goto
err_out
;
}
ctx
=
ntfs_attr_get_search_ctx
(
ni
,
m
);
if
(
unlikely
(
!
ctx
))
{
ntfs_error
(
vi
->
i_sb
,
"Failed to allocate a search context: "
"Not enough memory"
);
// FIXME: We can't report an error code upstream. So what do
// we do?!? make_bad_inode() seems a bit harsh...
unmap_mft_record
(
ni
);
return
;
ntfs_error
(
vi
->
i_sb
,
"Failed to allocate a search context for "
"inode 0x%lx (not enough memory).%s"
,
vi
->
i_ino
,
te
);
err
=
-
ENOMEM
;
goto
err_out
;
}
err
=
ntfs_attr_lookup
(
ni
->
type
,
ni
->
name
,
ni
->
name_len
,
CASE_SENSITIVE
,
0
,
NULL
,
0
,
ctx
);
if
(
unlikely
(
err
))
{
if
(
err
==
-
ENOENT
)
{
if
(
err
==
-
ENOENT
)
ntfs_error
(
vi
->
i_sb
,
"Open attribute is missing from "
"mft record. Inode 0x%lx is corrupt. "
"Run chkdsk."
,
vi
->
i_ino
);
make_bad_inode
(
vi
);
}
else
{
else
ntfs_error
(
vi
->
i_sb
,
"Failed to lookup attribute in "
"inode 0x%lx (error code %d)."
,
vi
->
i_ino
,
err
);
// FIXME: We can't report an error code upstream. So
// what do we do?!? make_bad_inode() seems a bit
// harsh...
}
goto
out
;
goto
err_out
;
}
/* If the size has not changed there is nothing to do. */
if
(
ntfs_attr_size
(
ctx
->
attr
)
==
i_size_read
(
vi
))
goto
out
;
goto
done
;
// TODO: Implement the truncate...
ntfs_error
(
vi
->
i_sb
,
"Inode size has changed but this is not "
"implemented yet. Resetting inode size to old value. "
" This is most likely a bug in the ntfs driver!"
);
i_size_write
(
vi
,
ntfs_attr_size
(
ctx
->
attr
));
out
:
done
:
ntfs_attr_put_search_ctx
(
ctx
);
unmap_mft_record
(
ni
);
ntfs_debug
(
"Done."
);
return
;
err_out:
if
(
err
!=
-
ENOMEM
)
{
NVolSetErrors
(
vol
);
make_bad_inode
(
vi
);
}
if
(
ctx
)
ntfs_attr_put_search_ctx
(
ctx
);
if
(
m
)
unmap_mft_record
(
ni
);
return
;
}
...
...
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