Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9532
Modified Files:
ntfsmount.c
Log Message:
ntfsmount: Mark information about free MFT records and clusters outdate after write operations everywhere.
Index: ntfsmount.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -p -r1.61 -r1.62
--- ntfsmount.c 22 Nov 2005 01:14:37 -0000 1.61
+++ ntfsmount.c 24 Nov 2005 15:06:11 -0000 1.62
@@ -814,6 +814,8 @@ static int ntfs_fuse_mknod(const char *o
else
res = ntfs_fuse_create_stream(path, stream_name,
stream_name_len);
+ /* Mark information about free MFT record and clusters outdate. */
+ ctx->state |= (NF_FreeClustersOutdate | NF_FreeMFTOutdate);
exit:
free(path);
if (stream_name_len)
@@ -826,6 +828,8 @@ static int ntfs_fuse_symlink(const char
if (strchr(from, ':') && /* n/a for named data streams. */
ctx->streams == NF_STREAMS_INTERFACE_WINDOWS)
return -EINVAL;
+ /* Mark information about free MFT record and clusters outdate. */
+ ctx->state |= (NF_FreeClustersOutdate | NF_FreeMFTOutdate);
return ntfs_fuse_create(from, S_IFLNK, 0, to);
}
@@ -869,6 +873,8 @@ static int ntfs_fuse_link(const char *ol
res = -EIO;
goto exit;
}
+ /* Mark information about free MFT record and clusters outdate. */
+ ctx->state |= (NF_FreeClustersOutdate | NF_FreeMFTOutdate);
/* Create hard link. */
if (ntfs_link(ni, dir_ni, uname, uname_len))
res = -errno;
@@ -969,6 +975,8 @@ static int ntfs_fuse_unlink(const char *
res = ntfs_fuse_rm(path);
else
res = ntfs_fuse_rm_stream(path, stream_name, stream_name_len);
+ /* Mark information about free MFT record and clusters outdate. */
+ ctx->state |= (NF_FreeClustersOutdate | NF_FreeMFTOutdate);
free(path);
if (stream_name_len)
free(stream_name);
@@ -993,6 +1001,8 @@ static int ntfs_fuse_mkdir(const char *p
{
if (strchr(path, ':') && ctx->streams == NF_STREAMS_INTERFACE_WINDOWS)
return -EINVAL; /* n/a for named data streams. */
+ /* Mark information about free MFT record and clusters outdate. */
+ ctx->state |= (NF_FreeClustersOutdate | NF_FreeMFTOutdate);
return ntfs_fuse_create(path, S_IFDIR, 0, NULL);
}
@@ -1000,6 +1010,8 @@ static int ntfs_fuse_rmdir(const char *p
{
if (strchr(path, ':') && ctx->streams == NF_STREAMS_INTERFACE_WINDOWS)
return -EINVAL; /* n/a for named data streams. */
+ /* Mark information about free MFT record and clusters outdate. */
+ ctx->state |= (NF_FreeClustersOutdate | NF_FreeMFTOutdate);
return ntfs_fuse_rm(path);
}
@@ -1245,6 +1257,8 @@ static int ntfs_fuse_setxattr(const char
res = -EEXIST;
goto exit;
}
+ /* Mark information about free MFT record and clusters outdate. */
+ ctx->state |= (NF_FreeClustersOutdate | NF_FreeMFTOutdate);
if (!na) {
if (flags == XATTR_REPLACE) {
res = -ENODATA;
@@ -1304,6 +1318,8 @@ static int ntfs_fuse_removexattr(const c
res = -ENODATA;
goto exit;
}
+ /* Mark information about free MFT record and clusters outdate. */
+ ctx->state |= (NF_FreeClustersOutdate | NF_FreeMFTOutdate);
if (ntfs_attr_rm(na))
res = -errno;
else
|