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
Kirill Smelkov
linux
Commits
9b274ca1
Commit
9b274ca1
authored
Apr 11, 2002
by
Anton Altaparmakov
Committed by
Anton Altaparmakov
Apr 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NTFS: Change default fmask to 0177, small cleanups, update version to 2.0.2.
parent
95015ed0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71 additions
and
44 deletions
+71
-44
Documentation/filesystems/ntfs.txt
Documentation/filesystems/ntfs.txt
+8
-6
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+6
-0
fs/ntfs/Makefile
fs/ntfs/Makefile
+17
-0
fs/ntfs/aops.c
fs/ntfs/aops.c
+1
-1
fs/ntfs/mst.c
fs/ntfs/mst.c
+34
-34
fs/ntfs/ntfs.h
fs/ntfs/ntfs.h
+1
-1
fs/ntfs/super.c
fs/ntfs/super.c
+4
-2
No files found.
Documentation/filesystems/ntfs.txt
View file @
9b274ca1
...
...
@@ -36,12 +36,14 @@ gid=
umask= Provide default owner, group, and access mode mask.
These options work as documented in mount(8). By
default, the files/directories are owned by root and
he/she has read, write, and execute permissions. No one
else has any access permissions. I.e. the mode on all
files and directories is by default rwx------, a
consequence of the default umask=0077. Using a
umask of zero will grant all permissions to everyone,
i.e. all files and directories will have mode rwxrwxrwx.
he/she has read and write permissions, as well as
browse permission for directories. No one else has any
access permissions. I.e. the mode on all files is by
default rw------- and for directories rwx------, a
consequence of the default fmask=0177 and dmask=0077.
Using a umask of zero will grant all permissions to
everyone, i.e. all files and directories will have mode
rwxrwxrwx.
fmask=
dmask= Instead of specifying umask which applies both to
...
...
fs/ntfs/ChangeLog
View file @
9b274ca1
...
...
@@ -27,6 +27,12 @@ ToDo:
quite big. Modularising them a bit, e.g. a-la get_block(), will make
them cleaner and make code reuse easier.
2.0.2 - Minor updates and cleanups.
- Cleanup: rename mst.c::__post_read_mst_fixup to post_write_mst_fixup
and cleanup the code a bit, removing the unused size parameter.
- Change default fmask to 0177 and update documentation.
2.0.1 - Minor updates.
- Make default umask correspond to documentation.
...
...
fs/ntfs/Makefile
0 → 100644
View file @
9b274ca1
# Rules for making the NTFS driver.
O_TARGET
:=
ntfs.o
obj-y
:=
time.o unistr.o inode.o file.o mft.o super.o debug.o aops.o
\
attrib.o dir.o namei.o mst.o upcase.o compress.o sysctl.o
obj-m
:=
$(O_TARGET)
EXTRA_CFLAGS
=
-DNTFS_VERSION
=
\"
2.0.2
\"
ifeq
($(CONFIG_NTFS_DEBUG),y)
EXTRA_CFLAGS
+=
-DDEBUG
endif
include
$(TOPDIR)/Rules.make
fs/ntfs/aops.c
View file @
9b274ca1
...
...
@@ -470,7 +470,7 @@ static int ntfs_mftbmp_readpage(ntfs_volume *vol, struct page *page)
* @bh: buffer head on which io is completed
* @uptodate: whether @bh is now uptodate or not
*
* Asynchronous I/O completion handler for reading pages belo
gn
ing to the
* Asynchronous I/O completion handler for reading pages belo
ng
ing to the
* index allocation attribute address space of directory inodes.
*
* Perform the post read mst fixups when all IO on the page has been completed
...
...
fs/ntfs/mst.c
View file @
9b274ca1
...
...
@@ -22,40 +22,6 @@
#include "ntfs.h"
/**
* __post_read_mst_fixup - fast deprotect multi sector transfer protected data
* @b: pointer to the data to deprotect
* @size: size in bytes of @b
*
* Perform the necessary post read multi sector transfer fixup, not checking for
* any errors. Defined inline for additional speed.
*/
inline
void
__post_read_mst_fixup
(
NTFS_RECORD
*
b
,
const
u32
size
)
{
u16
usa_ofs
,
usa_count
;
u16
*
usa_pos
,
*
data_pos
;
/* Setup the variables. */
usa_ofs
=
le16_to_cpu
(
b
->
usa_ofs
);
usa_count
=
le16_to_cpu
(
b
->
usa_count
)
-
1
;
/* Position of usn in update sequence array. */
usa_pos
=
(
u16
*
)
b
+
usa_ofs
/
sizeof
(
u16
);
/*
* Position in protected data of first u16 that needs fixing up.
*/
data_pos
=
(
u16
*
)
b
+
NTFS_BLOCK_SIZE
/
sizeof
(
u16
)
-
1
;
/* Fixup all sectors. */
while
(
usa_count
--
)
{
/*
* Increment position in usa and restore original data from
* the usa into the data buffer.
*/
*
data_pos
=
*
(
++
usa_pos
);
/* Increment position in data as well. */
data_pos
+=
NTFS_BLOCK_SIZE
/
sizeof
(
u16
);
}
}
/**
* post_read_mst_fixup - deprotect multi sector transfer protected data
* @b: pointer to the data to deprotect
...
...
@@ -200,3 +166,37 @@ int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size)
return
0
;
}
/**
* post_write_mst_fixup - fast deprotect multi sector transfer protected data
* @b: pointer to the data to deprotect
*
* Perform the necessary post write multi sector transfer fixup, not checking
* for any errors, because we assume we have just used pre_write_mst_fixup(),
* thus the data will be fine or we would never have gotten here.
*/
void
post_write_mst_fixup
(
NTFS_RECORD
*
b
)
{
u16
*
usa_pos
,
*
data_pos
;
u16
usa_ofs
=
le16_to_cpu
(
b
->
usa_ofs
);
u16
usa_count
=
le16_to_cpu
(
b
->
usa_count
)
-
1
;
/* Position of usn in update sequence array. */
usa_pos
=
(
u16
*
)
b
+
usa_ofs
/
sizeof
(
u16
);
/* Position in protected data of first u16 that needs fixing up. */
data_pos
=
(
u16
*
)
b
+
NTFS_BLOCK_SIZE
/
sizeof
(
u16
)
-
1
;
/* Fixup all sectors. */
while
(
usa_count
--
)
{
/*
* Increment position in usa and restore original data from
* the usa into the data buffer.
*/
*
data_pos
=
*
(
++
usa_pos
);
/* Increment position in data as well. */
data_pos
+=
NTFS_BLOCK_SIZE
/
sizeof
(
u16
);
}
}
fs/ntfs/ntfs.h
View file @
9b274ca1
...
...
@@ -221,9 +221,9 @@ extern int allocate_compression_buffers(void);
extern
void
free_compression_buffers
(
void
);
/* From fs/ntfs/mst.c */
extern
inline
void
__post_read_mst_fixup
(
NTFS_RECORD
*
b
,
const
u32
size
);
extern
int
post_read_mst_fixup
(
NTFS_RECORD
*
b
,
const
u32
size
);
extern
int
pre_write_mst_fixup
(
NTFS_RECORD
*
b
,
const
u32
size
);
extern
void
post_write_mst_fixup
(
NTFS_RECORD
*
b
);
/* From fs/ntfs/time.c */
extern
inline
s64
utc2ntfs
(
const
time_t
time
);
...
...
fs/ntfs/super.c
View file @
9b274ca1
...
...
@@ -1525,9 +1525,11 @@ static int ntfs_fill_super(struct super_block *sb, void *opt, const int silent)
/*
* Default is group and other don't have any access to files or
* directories while owner has full access.
* directories while owner has full access. Further files by default
* are not executable but directories are of course browseable.
*/
vol
->
fmask
=
vol
->
dmask
=
0077
;
vol
->
fmask
=
0177
;
vol
->
dmask
=
0077
;
/*
* Default is to show long file names (including POSIX file names), and
...
...
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