Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 838276 Details for
Bug 1044438
cifs: Unable to append to an existing file in cache=none mode.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch
0001-bz1044438-cifs-fix-offset-handling-in-cifs_iovec_wri.patch (text/plain), 2.21 KB, created by
Sachin Prabhu
on 2013-12-18 11:41:47 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Sachin Prabhu
Created:
2013-12-18 11:41:47 UTC
Size:
2.21 KB
patch
obsolete
>From d82e23bafdbe3d0b6a31db84a34af6df883618e0 Mon Sep 17 00:00:00 2001 >Date: Fri, 13 Apr 2012 17:16:59 -0400 >Subject: [RHEL6 PATCH] [bz1044438] cifs: fix offset handling in cifs_iovec_write > >A recent backport to the cifs module for RHEL 6.5 introduced a >function cifs_iovec_write() which is used by cache=none and >cache=strict modes. This function contained a bug which incorrectly >calculated the offsets resulting in an inability to do append >writes in these cache modes. This was fixed upstream but unfortunately >the fix wasn't backported together with the patches which introduced >those cache modes to RHEL 6.5. > >The default cache mode in RHEL 6.5 is cache=loose which shouldn't be >affected by this issue. > >Upstream commit: 3af9d8f227a31e25b3110ef175d105798fc147a6 >-- >In the recent update of the cifs_iovec_write code to use async writes, >the handling of the file position was broken. That patch added a local >"offset" variable to handle the offset, and then only updated the >original "*poffset" before exiting. > >Unfortunately, it copied off the original offset from the beginning, >instead of doing so after generic_write_checks had been called. Fix >this by moving the initialization of "offset" after that in the >function. > >Signed-off-by: Jeff Layton <jlayton@redhat.com> >Signed-off-by: Steve French <sfrench@us.ibm.com> >(cherry picked from commit 3af9d8f227a31e25b3110ef175d105798fc147a6) >-- > >Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> >--- > fs/cifs/file.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/fs/cifs/file.c b/fs/cifs/file.c >index e77b7c6..d1c4440 100644 >--- a/fs/cifs/file.c >+++ b/fs/cifs/file.c >@@ -1667,7 +1667,7 @@ cifs_iovec_write(struct file *file, const struct iovec *iov, > unsigned long nr_pages, i; > size_t copied, len, cur_len; > ssize_t total_written = 0; >- loff_t offset = *poffset; >+ loff_t offset; > struct iov_iter it; > struct cifsFileInfo *open_file; > struct cifs_tcon *tcon; >@@ -1689,6 +1689,7 @@ cifs_iovec_write(struct file *file, const struct iovec *iov, > cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); > open_file = file->private_data; > tcon = tlink_tcon(open_file->tlink); >+ offset = *poffset; > > if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RWPIDFORWARD) > pid = open_file->pid; >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1044438
: 838276