Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151135667
D11348.id30175.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D11348.id30175.diff
View Options
Index: head/sys/fs/fuse/fuse_io.c
===================================================================
--- head/sys/fs/fuse/fuse_io.c
+++ head/sys/fs/fuse/fuse_io.c
@@ -108,7 +108,7 @@
struct ucred *cred, struct fuse_filehandle *fufh);
static int
fuse_write_directbackend(struct vnode *vp, struct uio *uio,
- struct ucred *cred, struct fuse_filehandle *fufh);
+ struct ucred *cred, struct fuse_filehandle *fufh, int ioflag);
static int
fuse_write_biobackend(struct vnode *vp, struct uio *uio,
struct ucred *cred, struct fuse_filehandle *fufh, int ioflag);
@@ -156,7 +156,7 @@
if (directio) {
FS_DEBUG("direct write of vnode %ju via file handle %ju\n",
(uintmax_t)VTOILLU(vp), (uintmax_t)fufh->fh_id);
- err = fuse_write_directbackend(vp, uio, cred, fufh);
+ err = fuse_write_directbackend(vp, uio, cred, fufh, ioflag);
} else {
FS_DEBUG("buffered write of vnode %ju\n",
(uintmax_t)VTOILLU(vp));
@@ -318,7 +318,7 @@
static int
fuse_write_directbackend(struct vnode *vp, struct uio *uio,
- struct ucred *cred, struct fuse_filehandle *fufh)
+ struct ucred *cred, struct fuse_filehandle *fufh, int ioflag)
{
struct fuse_vnode_data *fvdat = VTOFUD(vp);
struct fuse_write_in *fwi;
@@ -327,8 +327,10 @@
int diff;
int err = 0;
- if (!uio->uio_resid)
+ if (uio->uio_resid == 0)
return (0);
+ if (ioflag & IO_APPEND)
+ uio_setoffset(uio, fvdat->filesize);
fdisp_init(&fdi, 0);
@@ -705,7 +707,7 @@
io.iov_base = (char *)bp->b_data + bp->b_dirtyoff;
uiop->uio_rw = UIO_WRITE;
- error = fuse_write_directbackend(vp, uiop, cred, fufh);
+ error = fuse_write_directbackend(vp, uiop, cred, fufh, 0);
if (error == EINTR || error == ETIMEDOUT
|| (!error && (bp->b_flags & B_NEEDCOMMIT))) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 8:10 AM (2 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31020210
Default Alt Text
D11348.id30175.diff (1 KB)
Attached To
Mode
D11348: Complete support for IO_APPEND flag in fuse
Attached
Detach File
Event Timeline
Log In to Comment