svn commit: linux-cifs-client r104 - in
branches/linux-converged-for-old-kernels/fs/cifs: .
sfrench at samba.org
sfrench at samba.org
Fri Feb 23 05:39:42 GMT 2007
Author: sfrench
Date: 2007-02-23 05:39:42 +0000 (Fri, 23 Feb 2007)
New Revision: 104
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=104
Log:
Merge with git tree
Modified:
branches/linux-converged-for-old-kernels/fs/cifs/README
branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
branches/linux-converged-for-old-kernels/fs/cifs/file.c
branches/linux-converged-for-old-kernels/fs/cifs/inode.c
branches/linux-converged-for-old-kernels/fs/cifs/link.c
branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/README
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/README 2007-02-08 18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/README 2007-02-23 05:39:42 UTC (rev 104)
@@ -1,5 +1,5 @@
The CIFS VFS support for Linux supports many advanced network filesystem
-features such as heirarchical dfs like namespace, hardlinks, locking and more.
+features such as hierarchical dfs like namespace, hardlinks, locking and more.
It was designed to comply with the SNIA CIFS Technical Reference (which
supersedes the 1992 X/Open SMB Standard) as well as to perform best practice
practical interoperability with Windows 2000, Windows XP, Samba and equivalent
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c 2007-02-08 18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c 2007-02-23 05:39:42 UTC (rev 104)
@@ -97,8 +97,9 @@
struct inode *inode;
struct cifs_sb_info *cifs_sb;
int rc = 0;
-
- sb->s_flags |= MS_NODIRATIME; /* and probably even noatime */
+
+ /* BB should we make this contingent on mount parm? */
+ sb->s_flags |= MS_NODIRATIME | MS_NOATIME;
sb->s_fs_info = kzalloc(sizeof(struct cifs_sb_info),GFP_KERNEL);
cifs_sb = CIFS_SB(sb);
if(cifs_sb == NULL)
@@ -288,7 +289,10 @@
cifs_inode->vfs_inode.i_blksize = CIFS_MAX_MSGSIZE;
#endif
cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */
- cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME;
+
+ /* Can not set i_flags here - they get immediately overwritten
+ to zero by the VFS */
+/* cifs_inode->vfs_inode.i_flags = S_NOATIME | S_NOCMTIME;*/
INIT_LIST_HEAD(&cifs_inode->openFileList);
return &cifs_inode->vfs_inode;
}
@@ -313,6 +317,7 @@
if (cifs_sb) {
if (cifs_sb->tcon) {
+/* BB add prepath to mount options displayed */
seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName);
if (cifs_sb->tcon->ses) {
if (cifs_sb->tcon->ses->userName)
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h 2007-02-08 18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifspdu.h 2007-02-23 05:39:42 UTC (rev 104)
@@ -35,9 +35,11 @@
#define BAD_PROT 0xFFFF
/* SMB command codes */
-/* Some commands have minimal (wct=0,bcc=0), or uninteresting, responses
- (ie which include no useful data other than the SMB error code itself).
- Knowing this helps avoid response buffer allocations and copy in some cases */
+/*
+ * Some commands have minimal (wct=0,bcc=0), or uninteresting, responses
+ * (ie which include no useful data other than the SMB error code itself).
+ * Knowing this helps avoid response buffer allocations and copy in some cases
+ */
#define SMB_COM_CREATE_DIRECTORY 0x00 /* trivial response */
#define SMB_COM_DELETE_DIRECTORY 0x01 /* trivial response */
#define SMB_COM_CLOSE 0x04 /* triv req/rsp, timestamp ignored */
Modified: branches/linux-converged-for-old-kernels/fs/cifs/file.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-08 18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-23 05:39:42 UTC (rev 104)
@@ -1044,8 +1044,9 @@
/* since the write may have blocked check these pointers again */
if (file->f_dentry) {
if (file->f_dentry->d_inode) {
- file->f_dentry->d_inode->i_ctime =
- file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
+/*BB We could make this contingent on superblock ATIME flag too */
+/* file->f_dentry->d_inode->i_ctime =
+ file->f_dentry->d_inode->i_mtime = CURRENT_TIME;*/
if (total_written > 0) {
if (*poffset > file->f_dentry->d_inode->i_size)
i_size_write(file->f_dentry->d_inode,
Modified: branches/linux-converged-for-old-kernels/fs/cifs/inode.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/inode.c 2007-02-08 18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/inode.c 2007-02-23 05:39:42 UTC (rev 104)
@@ -93,6 +93,9 @@
(*pinode)->i_ino =
(unsigned long)findData.UniqueId;
} /* note ino incremented to unique num in new_inode */
+ if(sb->s_flags & MS_NOATIME)
+ (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME;
+
insert_inode_hash(*pinode);
}
@@ -424,6 +427,8 @@
} else /* do we need cast or hash to ino? */
(*pinode)->i_ino = inode_num;
} /* else ino incremented to unique num in new_inode*/
+ if(sb->s_flags & MS_NOATIME)
+ (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME;
insert_inode_hash(*pinode);
}
inode = *pinode;
@@ -1378,7 +1383,7 @@
and this check ensures that we are not being called from
sys_utimes in which case we ought to fail the call back to
the user when the server rejects the call */
- if((rc) && (attrs->ia_valid &&
+ if((rc) && (attrs->ia_valid &
(ATTR_MODE | ATTR_GID | ATTR_UID | ATTR_SIZE)))
rc = 0;
}
Modified: branches/linux-converged-for-old-kernels/fs/cifs/link.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/link.c 2007-02-08 18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/link.c 2007-02-23 05:39:42 UTC (rev 104)
@@ -80,7 +80,8 @@
cifsInode = CIFS_I(old_file->d_inode);
if(rc == 0) {
old_file->d_inode->i_nlink++;
- old_file->d_inode->i_ctime = CURRENT_TIME;
+/* BB should we make this contingent on superblock flag NOATIME? */
+/* old_file->d_inode->i_ctime = CURRENT_TIME;*/
/* parent dir timestamps will update from srv
within a second, would it really be worth it
to set the parent dir cifs inode time to zero
Modified: branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/readdir.c 2007-02-08 18:16:41 UTC (rev 103)
+++ branches/linux-converged-for-old-kernels/fs/cifs/readdir.c 2007-02-23 05:39:42 UTC (rev 104)
@@ -83,6 +83,8 @@
return rc;
rc = 1;
}
+ if(file->f_path.dentry->d_sb->s_flags & MS_NOATIME)
+ (*ptmp_inode)->i_flags |= S_NOATIME | S_NOCMTIME;
} else {
tmp_dentry = d_alloc(file->f_dentry, qstring);
if(tmp_dentry == NULL) {
@@ -98,6 +100,8 @@
tmp_dentry->d_op = &cifs_dentry_ops;
if(*ptmp_inode == NULL)
return rc;
+ if(file->f_path.dentry->d_sb->s_flags & MS_NOATIME)
+ (*ptmp_inode)->i_flags |= S_NOATIME | S_NOCMTIME;
rc = 2;
}
More information about the samba-cvs
mailing list