Loading fs/cifs/inode.c +6 −0 Original line number Diff line number Diff line Loading @@ -318,6 +318,7 @@ int cifs_get_inode_info(struct inode **pinode, struct cifs_sb_info *cifs_sb = CIFS_SB(sb); char *tmp_path; char *buf = NULL; int adjustTZ = FALSE; pTcon = cifs_sb->tcon; cFYI(1,("Getting info on %s", search_path)); Loading Loading @@ -348,6 +349,7 @@ int cifs_get_inode_info(struct inode **pinode, pfindData, cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); adjustTZ = TRUE; } } Loading Loading @@ -444,6 +446,10 @@ int cifs_get_inode_info(struct inode **pinode, inode->i_ctime = cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime)); cFYI(0, ("Attributes came in as 0x%x", attr)); if(adjustTZ && (pTcon->ses) && (pTcon->ses->server)) { inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj; inode->i_mtime.tv_sec += pTcon->ses->server->timeAdj; } /* set default mode. will override for dirs below */ if (atomic_read(&cifsInfo->inUse) == 0) Loading fs/cifs/link.c +23 −10 Original line number Diff line number Diff line Loading @@ -69,17 +69,30 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode, rc = -EOPNOTSUPP; } /* if (!rc) */ { /* renew_parental_timestamps(old_file); inode->i_nlink++; mark_inode_dirty(inode); d_instantiate(direntry, inode); */ /* BB add call to either mark inode dirty or refresh its data and timestamp to current time */ } d_drop(direntry); /* force new lookup from server */ d_drop(direntry); /* force new lookup from server of target */ /* if source file is cached (oplocked) revalidate will not go to server until the file is closed or oplock broken so update nlinks locally */ if(old_file->d_inode) { cifsInode = CIFS_I(old_file->d_inode); cifsInode->time = 0; /* will force revalidate to go get info when needed */ if(rc == 0) { old_file->d_inode->i_nlink++; 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 to force revalidate (faster) for it too? */ } /* if not oplocked will force revalidate to get info on source file from srv */ cifsInode->time = 0; /* Will update parent dir timestamps from srv within a second. Would it really be worth it to set the parent dir (cifs inode) time field to zero to force revalidate on parent directory faster ie CIFS_I(inode)->time = 0; */ } cifs_hl_exit: kfree(fromName); Loading Loading
fs/cifs/inode.c +6 −0 Original line number Diff line number Diff line Loading @@ -318,6 +318,7 @@ int cifs_get_inode_info(struct inode **pinode, struct cifs_sb_info *cifs_sb = CIFS_SB(sb); char *tmp_path; char *buf = NULL; int adjustTZ = FALSE; pTcon = cifs_sb->tcon; cFYI(1,("Getting info on %s", search_path)); Loading Loading @@ -348,6 +349,7 @@ int cifs_get_inode_info(struct inode **pinode, pfindData, cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); adjustTZ = TRUE; } } Loading Loading @@ -444,6 +446,10 @@ int cifs_get_inode_info(struct inode **pinode, inode->i_ctime = cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime)); cFYI(0, ("Attributes came in as 0x%x", attr)); if(adjustTZ && (pTcon->ses) && (pTcon->ses->server)) { inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj; inode->i_mtime.tv_sec += pTcon->ses->server->timeAdj; } /* set default mode. will override for dirs below */ if (atomic_read(&cifsInfo->inUse) == 0) Loading
fs/cifs/link.c +23 −10 Original line number Diff line number Diff line Loading @@ -69,17 +69,30 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode, rc = -EOPNOTSUPP; } /* if (!rc) */ { /* renew_parental_timestamps(old_file); inode->i_nlink++; mark_inode_dirty(inode); d_instantiate(direntry, inode); */ /* BB add call to either mark inode dirty or refresh its data and timestamp to current time */ } d_drop(direntry); /* force new lookup from server */ d_drop(direntry); /* force new lookup from server of target */ /* if source file is cached (oplocked) revalidate will not go to server until the file is closed or oplock broken so update nlinks locally */ if(old_file->d_inode) { cifsInode = CIFS_I(old_file->d_inode); cifsInode->time = 0; /* will force revalidate to go get info when needed */ if(rc == 0) { old_file->d_inode->i_nlink++; 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 to force revalidate (faster) for it too? */ } /* if not oplocked will force revalidate to get info on source file from srv */ cifsInode->time = 0; /* Will update parent dir timestamps from srv within a second. Would it really be worth it to set the parent dir (cifs inode) time field to zero to force revalidate on parent directory faster ie CIFS_I(inode)->time = 0; */ } cifs_hl_exit: kfree(fromName); Loading