Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
7d0ffdb2
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7d0ffdb2
编写于
10月 19, 2005
作者:
A
Anton Altaparmakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NTFS: $EA attributes can be both resident non-resident.
Minor tidying. Signed-off-by:
N
Anton Altaparmakov
<
aia21@cantab.net
>
上级
e087a412
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
35 addition
and
14 deletion
+35
-14
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+1
-0
fs/ntfs/aops.c
fs/ntfs/aops.c
+2
-3
fs/ntfs/attrib.c
fs/ntfs/attrib.c
+1
-1
fs/ntfs/file.c
fs/ntfs/file.c
+14
-0
fs/ntfs/layout.h
fs/ntfs/layout.h
+17
-10
未找到文件。
fs/ntfs/ChangeLog
浏览文件 @
7d0ffdb2
...
...
@@ -75,6 +75,7 @@ ToDo/Notes:
for highly fragmented files, i.e. ones whose data attribute is split
across multiple extents. When such a case is encountered,
EOPNOTSUPP is returned.
- $EA attributes can be both resident non-resident.
2.1.24 - Lots of bug fixes and support more clean journal states.
...
...
fs/ntfs/aops.c
浏览文件 @
7d0ffdb2
...
...
@@ -1391,8 +1391,7 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
if
(
NInoEncrypted
(
ni
))
{
unlock_page
(
page
);
BUG_ON
(
ni
->
type
!=
AT_DATA
);
ntfs_debug
(
"Denying write access to encrypted "
"file."
);
ntfs_debug
(
"Denying write access to encrypted file."
);
return
-
EACCES
;
}
/* Compressed data streams are handled in compress.c. */
...
...
@@ -1508,8 +1507,8 @@ static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
/* Zero out of bounds area in the page cache page. */
memset
(
kaddr
+
attr_len
,
0
,
PAGE_CACHE_SIZE
-
attr_len
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
flush_dcache_mft_record_page
(
ctx
->
ntfs_ino
);
flush_dcache_page
(
page
);
flush_dcache_mft_record_page
(
ctx
->
ntfs_ino
);
/* We are done with the page. */
end_page_writeback
(
page
);
/* Finally, mark the mft record dirty, so it gets written back. */
...
...
fs/ntfs/attrib.c
浏览文件 @
7d0ffdb2
...
...
@@ -1411,7 +1411,7 @@ int ntfs_attr_can_be_non_resident(const ntfs_volume *vol, const ATTR_TYPE type)
*/
int
ntfs_attr_can_be_resident
(
const
ntfs_volume
*
vol
,
const
ATTR_TYPE
type
)
{
if
(
type
==
AT_INDEX_ALLOCATION
||
type
==
AT_EA
)
if
(
type
==
AT_INDEX_ALLOCATION
)
return
-
EPERM
;
return
0
;
}
...
...
fs/ntfs/file.c
浏览文件 @
7d0ffdb2
...
...
@@ -1857,10 +1857,24 @@ static ssize_t ntfs_file_buffered_write(struct kiocb *iocb,
if
(
ni
->
type
!=
AT_INDEX_ALLOCATION
)
{
/* If file is encrypted, deny access, just like NT4. */
if
(
NInoEncrypted
(
ni
))
{
/*
* Reminder for later: Encrypted files are _always_
* non-resident so that the content can always be
* encrypted.
*/
ntfs_debug
(
"Denying write access to encrypted file."
);
return
-
EACCES
;
}
if
(
NInoCompressed
(
ni
))
{
/* Only unnamed $DATA attribute can be compressed. */
BUG_ON
(
ni
->
type
!=
AT_DATA
);
BUG_ON
(
ni
->
name_len
);
/*
* Reminder for later: If resident, the data is not
* actually compressed. Only on the switch to non-
* resident does compression kick in. This is in
* contrast to encrypted files (see above).
*/
ntfs_error
(
vi
->
i_sb
,
"Writing to compressed files is "
"not implemented yet. Sorry."
);
return
-
EOPNOTSUPP
;
...
...
fs/ntfs/layout.h
浏览文件 @
7d0ffdb2
...
...
@@ -1021,10 +1021,17 @@ enum {
FILE_NAME_POSIX
=
0x00
,
/* This is the largest namespace. It is case sensitive and allows all
Unicode characters except for: '\0' and '/'. Beware that in
WinNT/2k files which eg have the same name except for their case
will not be distinguished by the standard utilities and thus a "del
filename" will delete both "filename" and "fileName" without
warning. */
WinNT/2k/2003 by default files which eg have the same name except
for their case will not be distinguished by the standard utilities
and thus a "del filename" will delete both "filename" and "fileName"
without warning. However if for example Services For Unix (SFU) are
installed and the case sensitive option was enabled at installation
time, then you can create/access/delete such files.
Note that even SFU places restrictions on the filenames beyond the
'\0' and '/' and in particular the following set of characters is
not allowed: '"', '/', '<', '>', '\'. All other characters,
including the ones no allowed in WIN32 namespace are allowed.
Tested with SFU 3.5 (this is now free) running on Windows XP. */
FILE_NAME_WIN32
=
0x01
,
/* The standard WinNT/2k NTFS long filenames. Case insensitive. All
Unicode chars except: '\0', '"', '*', '/', ':', '<', '>', '?', '\',
...
...
@@ -2375,20 +2382,20 @@ typedef u8 EA_FLAGS;
/*
* Attribute: Extended attribute (EA) (0xe0).
*
* NOTE:
Always non-resident. (Is this true?)
* NOTE:
Can be resident or non-resident.
*
* Like the attribute list and the index buffer list, the EA attribute value is
* a sequence of EA_ATTR variable length records.
*
* FIXME: It appears weird that the EA name is not unicode. Is it true?
*/
typedef
struct
{
le32
next_entry_offset
;
/* Offset to the next EA_ATTR. */
EA_FLAGS
flags
;
/* Flags describing the EA. */
u8
ea_name_length
;
/* Length of the name of the EA in bytes. */
u8
ea_name_length
;
/* Length of the name of the EA in bytes
excluding the '\0' byte terminator. */
le16
ea_value_length
;
/* Byte size of the EA's value. */
u8
ea_name
[
0
];
/* Name of the EA. */
u8
ea_value
[
0
];
/* The value of the EA. Immediately follows
u8
ea_name
[
0
];
/* Name of the EA. Note this is ASCII, not
Unicode and it is zero terminated. */
u8
ea_value
[
0
];
/* The value of the EA. Immediately follows
the name. */
}
__attribute__
((
__packed__
))
EA_ATTR
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录