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
e91bcb8b
Commit
e91bcb8b
authored
Oct 07, 2004
by
Anton Altaparmakov
Committed by
Richard Russon
Oct 07, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NTFS: Remove unused {__,}format_mft_record() from fs/ntfs/mft.c.
Signed-off-by:
Anton Altaparmakov
<
aia21@cantab.net
>
parent
0c6ad673
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
73 deletions
+1
-73
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+1
-0
fs/ntfs/mft.c
fs/ntfs/mft.c
+0
-73
No files found.
fs/ntfs/ChangeLog
View file @
e91bcb8b
...
...
@@ -58,6 +58,7 @@ ToDo/Notes:
include errors.
- Move the typedefs for runlist_element and runlist from types.h to
runlist.h and fix resulting include errors.
- Remove unused {__,}format_mft_record() from fs/ntfs/mft.c.
2.1.20 - Fix two stupid bugs introduced in 2.1.18 release.
...
...
fs/ntfs/mft.c
View file @
e91bcb8b
...
...
@@ -31,79 +31,6 @@
#include "malloc.h"
#include "ntfs.h"
/**
* __format_mft_record - initialize an empty mft record
* @m: mapped, pinned and locked for writing mft record
* @size: size of the mft record
* @rec_no: mft record number / inode number
*
* Private function to initialize an empty mft record. Use one of the two
* provided format_mft_record() functions instead.
*/
static
void
__format_mft_record
(
MFT_RECORD
*
m
,
const
int
size
,
const
unsigned
long
rec_no
)
{
ATTR_RECORD
*
a
;
memset
(
m
,
0
,
size
);
m
->
magic
=
magic_FILE
;
/* Aligned to 2-byte boundary. */
m
->
usa_ofs
=
cpu_to_le16
((
sizeof
(
MFT_RECORD
)
+
1
)
&
~
1
);
m
->
usa_count
=
cpu_to_le16
(
size
/
NTFS_BLOCK_SIZE
+
1
);
/* Set the update sequence number to 1. */
*
(
le16
*
)((
char
*
)
m
+
((
sizeof
(
MFT_RECORD
)
+
1
)
&
~
1
))
=
cpu_to_le16
(
1
);
m
->
lsn
=
cpu_to_le64
(
0LL
);
m
->
sequence_number
=
cpu_to_le16
(
1
);
m
->
link_count
=
0
;
/* Aligned to 8-byte boundary. */
m
->
attrs_offset
=
cpu_to_le16
((
le16_to_cpu
(
m
->
usa_ofs
)
+
(
le16_to_cpu
(
m
->
usa_count
)
<<
1
)
+
7
)
&
~
7
);
m
->
flags
=
0
;
/*
* Using attrs_offset plus eight bytes (for the termination attribute),
* aligned to 8-byte boundary.
*/
m
->
bytes_in_use
=
cpu_to_le32
((
le16_to_cpu
(
m
->
attrs_offset
)
+
8
+
7
)
&
~
7
);
m
->
bytes_allocated
=
cpu_to_le32
(
size
);
m
->
base_mft_record
=
cpu_to_le64
((
MFT_REF
)
0
);
m
->
next_attr_instance
=
0
;
a
=
(
ATTR_RECORD
*
)((
char
*
)
m
+
le16_to_cpu
(
m
->
attrs_offset
));
a
->
type
=
AT_END
;
a
->
length
=
0
;
}
/**
* format_mft_record - initialize an empty mft record
* @ni: ntfs inode of mft record
* @mft_rec: mapped, pinned and locked mft record (optional)
*
* Initialize an empty mft record. This is used when extending the MFT.
*
* If @mft_rec is NULL, we call map_mft_record() to obtain the
* record and we unmap it again when finished.
*
* We return 0 on success or -errno on error.
*/
int
format_mft_record
(
ntfs_inode
*
ni
,
MFT_RECORD
*
mft_rec
)
{
MFT_RECORD
*
m
;
if
(
mft_rec
)
m
=
mft_rec
;
else
{
m
=
map_mft_record
(
ni
);
if
(
IS_ERR
(
m
))
return
PTR_ERR
(
m
);
}
__format_mft_record
(
m
,
ni
->
vol
->
mft_record_size
,
ni
->
mft_no
);
if
(
!
mft_rec
)
{
// FIXME: Need to set the mft record dirty!
unmap_mft_record
(
ni
);
}
return
0
;
}
/**
* ntfs_readpage - external declaration, function is in fs/ntfs/aops.c
*/
...
...
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