Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11967
b: refs/heads/master
c: e943825
h: refs/heads/master
i:
  11965: 3fe8b39
  11963: fc1c9e0
  11959: b8b7ab8
  11951: a82d957
  11935: eea361a
  11903: 06145c4
v: v3
  • Loading branch information
Anton Altaparmakov committed Oct 4, 2005
1 parent 27241c3 commit 44a80c5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd072330d1a60be11a5c284fa1e645350750a4fc
refs/heads/master: e9438250b635f7832e99a8c8d2e394dd1522ce65
7 changes: 7 additions & 0 deletions trunk/fs/ntfs/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ ToDo/Notes:
but not the initialized size can be extended, too.
- Implement fs/ntfs/inode.[hc]::ntfs_truncate(). It only supports
uncompressed and unencrypted files.
- Enable ATTR_SIZE attribute changes in ntfs_setattr(). This completes
the initial implementation of file truncation. Now both open(2)ing
a file with the O_TRUNC flag and the {,f}truncate(2) system calls
will resize a file appropriately. The limitations are that only
uncompressed and unencrypted files are supported. Also, there is
only very limited support for highly fragmented files (the ones whose
$DATA attribute is split into multiple attribute extents).

2.1.24 - Lots of bug fixes and support more clean journal states.

Expand Down
23 changes: 15 additions & 8 deletions trunk/fs/ntfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2845,23 +2845,30 @@ int ntfs_setattr(struct dentry *dentry, struct iattr *attr)

err = inode_change_ok(vi, attr);
if (err)
return err;

goto out;
/* We do not support NTFS ACLs yet. */
if (ia_valid & (ATTR_UID | ATTR_GID | ATTR_MODE)) {
ntfs_warning(vi->i_sb, "Changes in user/group/mode are not "
"supported yet, ignoring.");
err = -EOPNOTSUPP;
goto out;
}

if (ia_valid & ATTR_SIZE) {
if (attr->ia_size != i_size_read(vi)) {
ntfs_warning(vi->i_sb, "Changes in inode size are not "
"supported yet, ignoring.");
err = -EOPNOTSUPP;
// TODO: Implement...
// err = vmtruncate(vi, attr->ia_size);
ntfs_inode *ni = NTFS_I(vi);
/*
* FIXME: For now we do not support resizing of
* compressed or encrypted files yet.
*/
if (NInoCompressed(ni) || NInoEncrypted(ni)) {
ntfs_warning(vi->i_sb, "Changes in inode size "
"are not supported yet for "
"%s files, ignoring.",
NInoCompressed(ni) ?
"compressed" : "encrypted");
err = -EOPNOTSUPP;
} else
err = vmtruncate(vi, attr->ia_size);
if (err || ia_valid == ATTR_SIZE)
goto out;
} else {
Expand Down

0 comments on commit 44a80c5

Please sign in to comment.