diff options
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 18 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 20 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 3 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 18 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.h | 8 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 16 |
7 files changed, 45 insertions, 40 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 6cbbd165c60d..4d191ef39b67 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -870,12 +870,14 @@ xfs_page_state_convert( | |||
870 | pgoff_t end_index, last_index, tlast; | 870 | pgoff_t end_index, last_index, tlast; |
871 | ssize_t size, len; | 871 | ssize_t size, len; |
872 | int flags, err, iomap_valid = 0, uptodate = 1; | 872 | int flags, err, iomap_valid = 0, uptodate = 1; |
873 | int page_dirty, count = 0, trylock_flag = 0; | 873 | int page_dirty, count = 0; |
874 | int trylock = 0; | ||
874 | int all_bh = unmapped; | 875 | int all_bh = unmapped; |
875 | 876 | ||
876 | /* wait for other IO threads? */ | 877 | if (startio) { |
877 | if (startio && (wbc->sync_mode == WB_SYNC_NONE && wbc->nonblocking)) | 878 | if (wbc->sync_mode == WB_SYNC_NONE && wbc->nonblocking) |
878 | trylock_flag |= BMAPI_TRYLOCK; | 879 | trylock |= BMAPI_TRYLOCK; |
880 | } | ||
879 | 881 | ||
880 | /* Is this page beyond the end of the file? */ | 882 | /* Is this page beyond the end of the file? */ |
881 | offset = i_size_read(inode); | 883 | offset = i_size_read(inode); |
@@ -956,15 +958,13 @@ xfs_page_state_convert( | |||
956 | 958 | ||
957 | if (buffer_unwritten(bh)) { | 959 | if (buffer_unwritten(bh)) { |
958 | type = IOMAP_UNWRITTEN; | 960 | type = IOMAP_UNWRITTEN; |
959 | flags = BMAPI_WRITE|BMAPI_IGNSTATE; | 961 | flags = BMAPI_WRITE | BMAPI_IGNSTATE; |
960 | } else if (buffer_delay(bh)) { | 962 | } else if (buffer_delay(bh)) { |
961 | type = IOMAP_DELAY; | 963 | type = IOMAP_DELAY; |
962 | flags = BMAPI_ALLOCATE; | 964 | flags = BMAPI_ALLOCATE | trylock; |
963 | if (!startio) | ||
964 | flags |= trylock_flag; | ||
965 | } else { | 965 | } else { |
966 | type = IOMAP_NEW; | 966 | type = IOMAP_NEW; |
967 | flags = BMAPI_WRITE|BMAPI_MMAP; | 967 | flags = BMAPI_WRITE | BMAPI_MMAP; |
968 | } | 968 | } |
969 | 969 | ||
970 | if (!iomap_valid) { | 970 | if (!iomap_valid) { |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 9fb0312665ca..26fed0756f01 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -182,7 +182,7 @@ free_address( | |||
182 | { | 182 | { |
183 | a_list_t *aentry; | 183 | a_list_t *aentry; |
184 | 184 | ||
185 | aentry = kmalloc(sizeof(a_list_t), GFP_ATOMIC & ~__GFP_HIGH); | 185 | aentry = kmalloc(sizeof(a_list_t), GFP_NOWAIT); |
186 | if (likely(aentry)) { | 186 | if (likely(aentry)) { |
187 | spin_lock(&as_lock); | 187 | spin_lock(&as_lock); |
188 | aentry->next = as_free_head; | 188 | aentry->next = as_free_head; |
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index ae4c4754ed31..c847416f6d10 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -252,56 +252,60 @@ xfs_file_sendfile_invis( | |||
252 | STATIC ssize_t | 252 | STATIC ssize_t |
253 | xfs_file_splice_read( | 253 | xfs_file_splice_read( |
254 | struct file *infilp, | 254 | struct file *infilp, |
255 | struct inode *pipe, | 255 | loff_t *ppos, |
256 | struct pipe_inode_info *pipe, | ||
256 | size_t len, | 257 | size_t len, |
257 | unsigned int flags) | 258 | unsigned int flags) |
258 | { | 259 | { |
259 | vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode); | 260 | vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode); |
260 | ssize_t rval; | 261 | ssize_t rval; |
261 | 262 | ||
262 | VOP_SPLICE_READ(vp, infilp, pipe, len, flags, 0, NULL, rval); | 263 | VOP_SPLICE_READ(vp, infilp, ppos, pipe, len, flags, 0, NULL, rval); |
263 | return rval; | 264 | return rval; |
264 | } | 265 | } |
265 | 266 | ||
266 | STATIC ssize_t | 267 | STATIC ssize_t |
267 | xfs_file_splice_read_invis( | 268 | xfs_file_splice_read_invis( |
268 | struct file *infilp, | 269 | struct file *infilp, |
269 | struct inode *pipe, | 270 | loff_t *ppos, |
271 | struct pipe_inode_info *pipe, | ||
270 | size_t len, | 272 | size_t len, |
271 | unsigned int flags) | 273 | unsigned int flags) |
272 | { | 274 | { |
273 | vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode); | 275 | vnode_t *vp = vn_from_inode(infilp->f_dentry->d_inode); |
274 | ssize_t rval; | 276 | ssize_t rval; |
275 | 277 | ||
276 | VOP_SPLICE_READ(vp, infilp, pipe, len, flags, IO_INVIS, NULL, rval); | 278 | VOP_SPLICE_READ(vp, infilp, ppos, pipe, len, flags, IO_INVIS, NULL, rval); |
277 | return rval; | 279 | return rval; |
278 | } | 280 | } |
279 | 281 | ||
280 | STATIC ssize_t | 282 | STATIC ssize_t |
281 | xfs_file_splice_write( | 283 | xfs_file_splice_write( |
282 | struct inode *pipe, | 284 | struct pipe_inode_info *pipe, |
283 | struct file *outfilp, | 285 | struct file *outfilp, |
286 | loff_t *ppos, | ||
284 | size_t len, | 287 | size_t len, |
285 | unsigned int flags) | 288 | unsigned int flags) |
286 | { | 289 | { |
287 | vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode); | 290 | vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode); |
288 | ssize_t rval; | 291 | ssize_t rval; |
289 | 292 | ||
290 | VOP_SPLICE_WRITE(vp, pipe, outfilp, len, flags, 0, NULL, rval); | 293 | VOP_SPLICE_WRITE(vp, pipe, outfilp, ppos, len, flags, 0, NULL, rval); |
291 | return rval; | 294 | return rval; |
292 | } | 295 | } |
293 | 296 | ||
294 | STATIC ssize_t | 297 | STATIC ssize_t |
295 | xfs_file_splice_write_invis( | 298 | xfs_file_splice_write_invis( |
296 | struct inode *pipe, | 299 | struct pipe_inode_info *pipe, |
297 | struct file *outfilp, | 300 | struct file *outfilp, |
301 | loff_t *ppos, | ||
298 | size_t len, | 302 | size_t len, |
299 | unsigned int flags) | 303 | unsigned int flags) |
300 | { | 304 | { |
301 | vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode); | 305 | vnode_t *vp = vn_from_inode(outfilp->f_dentry->d_inode); |
302 | ssize_t rval; | 306 | ssize_t rval; |
303 | 307 | ||
304 | VOP_SPLICE_WRITE(vp, pipe, outfilp, len, flags, IO_INVIS, NULL, rval); | 308 | VOP_SPLICE_WRITE(vp, pipe, outfilp, ppos, len, flags, IO_INVIS, NULL, rval); |
305 | return rval; | 309 | return rval; |
306 | } | 310 | } |
307 | 311 | ||
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 149237304fb6..2e2e275c786f 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -673,8 +673,7 @@ xfs_vn_setattr( | |||
673 | if (ia_valid & ATTR_ATIME) { | 673 | if (ia_valid & ATTR_ATIME) { |
674 | vattr.va_mask |= XFS_AT_ATIME; | 674 | vattr.va_mask |= XFS_AT_ATIME; |
675 | vattr.va_atime = attr->ia_atime; | 675 | vattr.va_atime = attr->ia_atime; |
676 | if (ia_valid & ATTR_ATIME_SET) | 676 | inode->i_atime = attr->ia_atime; |
677 | inode->i_atime = attr->ia_atime; | ||
678 | } | 677 | } |
679 | if (ia_valid & ATTR_MTIME) { | 678 | if (ia_valid & ATTR_MTIME) { |
680 | vattr.va_mask |= XFS_AT_MTIME; | 679 | vattr.va_mask |= XFS_AT_MTIME; |
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 90cd314acbaa..67efe3308980 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -338,7 +338,8 @@ ssize_t | |||
338 | xfs_splice_read( | 338 | xfs_splice_read( |
339 | bhv_desc_t *bdp, | 339 | bhv_desc_t *bdp, |
340 | struct file *infilp, | 340 | struct file *infilp, |
341 | struct inode *pipe, | 341 | loff_t *ppos, |
342 | struct pipe_inode_info *pipe, | ||
342 | size_t count, | 343 | size_t count, |
343 | int flags, | 344 | int flags, |
344 | int ioflags, | 345 | int ioflags, |
@@ -360,7 +361,7 @@ xfs_splice_read( | |||
360 | int error; | 361 | int error; |
361 | 362 | ||
362 | error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), | 363 | error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), |
363 | infilp->f_pos, count, | 364 | *ppos, count, |
364 | FILP_DELAY_FLAG(infilp), &locktype); | 365 | FILP_DELAY_FLAG(infilp), &locktype); |
365 | if (error) { | 366 | if (error) { |
366 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | 367 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); |
@@ -368,8 +369,8 @@ xfs_splice_read( | |||
368 | } | 369 | } |
369 | } | 370 | } |
370 | xfs_rw_enter_trace(XFS_SPLICE_READ_ENTER, &ip->i_iocore, | 371 | xfs_rw_enter_trace(XFS_SPLICE_READ_ENTER, &ip->i_iocore, |
371 | pipe, count, infilp->f_pos, ioflags); | 372 | pipe, count, *ppos, ioflags); |
372 | ret = generic_file_splice_read(infilp, pipe, count, flags); | 373 | ret = generic_file_splice_read(infilp, ppos, pipe, count, flags); |
373 | if (ret > 0) | 374 | if (ret > 0) |
374 | XFS_STATS_ADD(xs_read_bytes, ret); | 375 | XFS_STATS_ADD(xs_read_bytes, ret); |
375 | 376 | ||
@@ -380,8 +381,9 @@ xfs_splice_read( | |||
380 | ssize_t | 381 | ssize_t |
381 | xfs_splice_write( | 382 | xfs_splice_write( |
382 | bhv_desc_t *bdp, | 383 | bhv_desc_t *bdp, |
383 | struct inode *pipe, | 384 | struct pipe_inode_info *pipe, |
384 | struct file *outfilp, | 385 | struct file *outfilp, |
386 | loff_t *ppos, | ||
385 | size_t count, | 387 | size_t count, |
386 | int flags, | 388 | int flags, |
387 | int ioflags, | 389 | int ioflags, |
@@ -403,7 +405,7 @@ xfs_splice_write( | |||
403 | int error; | 405 | int error; |
404 | 406 | ||
405 | error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, BHV_TO_VNODE(bdp), | 407 | error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, BHV_TO_VNODE(bdp), |
406 | outfilp->f_pos, count, | 408 | *ppos, count, |
407 | FILP_DELAY_FLAG(outfilp), &locktype); | 409 | FILP_DELAY_FLAG(outfilp), &locktype); |
408 | if (error) { | 410 | if (error) { |
409 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); | 411 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); |
@@ -411,8 +413,8 @@ xfs_splice_write( | |||
411 | } | 413 | } |
412 | } | 414 | } |
413 | xfs_rw_enter_trace(XFS_SPLICE_WRITE_ENTER, &ip->i_iocore, | 415 | xfs_rw_enter_trace(XFS_SPLICE_WRITE_ENTER, &ip->i_iocore, |
414 | pipe, count, outfilp->f_pos, ioflags); | 416 | pipe, count, *ppos, ioflags); |
415 | ret = generic_file_splice_write(pipe, outfilp, count, flags); | 417 | ret = generic_file_splice_write(pipe, outfilp, ppos, count, flags); |
416 | if (ret > 0) | 418 | if (ret > 0) |
417 | XFS_STATS_ADD(xs_write_bytes, ret); | 419 | XFS_STATS_ADD(xs_write_bytes, ret); |
418 | 420 | ||
diff --git a/fs/xfs/linux-2.6/xfs_lrw.h b/fs/xfs/linux-2.6/xfs_lrw.h index eaa5659713fb..8f4539952350 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.h +++ b/fs/xfs/linux-2.6/xfs_lrw.h | |||
@@ -93,11 +93,11 @@ extern ssize_t xfs_write(struct bhv_desc *, struct kiocb *, | |||
93 | extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *, | 93 | extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *, |
94 | loff_t *, int, size_t, read_actor_t, | 94 | loff_t *, int, size_t, read_actor_t, |
95 | void *, struct cred *); | 95 | void *, struct cred *); |
96 | extern ssize_t xfs_splice_read(struct bhv_desc *, struct file *, | 96 | extern ssize_t xfs_splice_read(struct bhv_desc *, struct file *, loff_t *, |
97 | struct inode *, size_t, int, int, | 97 | struct pipe_inode_info *, size_t, int, int, |
98 | struct cred *); | 98 | struct cred *); |
99 | extern ssize_t xfs_splice_write(struct bhv_desc *, struct inode *, | 99 | extern ssize_t xfs_splice_write(struct bhv_desc *, struct pipe_inode_info *, |
100 | struct file *, size_t, int, int, | 100 | struct file *, loff_t *, size_t, int, int, |
101 | struct cred *); | 101 | struct cred *); |
102 | 102 | ||
103 | #endif /* __XFS_LRW_H__ */ | 103 | #endif /* __XFS_LRW_H__ */ |
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index 6f1c79a28f8b..2a8e16c22353 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -173,11 +173,11 @@ typedef ssize_t (*vop_write_t)(bhv_desc_t *, struct kiocb *, | |||
173 | typedef ssize_t (*vop_sendfile_t)(bhv_desc_t *, struct file *, | 173 | typedef ssize_t (*vop_sendfile_t)(bhv_desc_t *, struct file *, |
174 | loff_t *, int, size_t, read_actor_t, | 174 | loff_t *, int, size_t, read_actor_t, |
175 | void *, struct cred *); | 175 | void *, struct cred *); |
176 | typedef ssize_t (*vop_splice_read_t)(bhv_desc_t *, struct file *, | 176 | typedef ssize_t (*vop_splice_read_t)(bhv_desc_t *, struct file *, loff_t *, |
177 | struct inode *, size_t, int, int, | 177 | struct pipe_inode_info *, size_t, int, int, |
178 | struct cred *); | 178 | struct cred *); |
179 | typedef ssize_t (*vop_splice_write_t)(bhv_desc_t *, struct inode *, | 179 | typedef ssize_t (*vop_splice_write_t)(bhv_desc_t *, struct pipe_inode_info *, |
180 | struct file *, size_t, int, int, | 180 | struct file *, loff_t *, size_t, int, int, |
181 | struct cred *); | 181 | struct cred *); |
182 | typedef int (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *, | 182 | typedef int (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *, |
183 | int, unsigned int, void __user *); | 183 | int, unsigned int, void __user *); |
@@ -284,10 +284,10 @@ typedef struct vnodeops { | |||
284 | rv = _VOP_(vop_write, vp)((vp)->v_fbhv,file,iov,segs,offset,ioflags,cr) | 284 | rv = _VOP_(vop_write, vp)((vp)->v_fbhv,file,iov,segs,offset,ioflags,cr) |
285 | #define VOP_SENDFILE(vp,f,off,ioflags,cnt,act,targ,cr,rv) \ | 285 | #define VOP_SENDFILE(vp,f,off,ioflags,cnt,act,targ,cr,rv) \ |
286 | rv = _VOP_(vop_sendfile, vp)((vp)->v_fbhv,f,off,ioflags,cnt,act,targ,cr) | 286 | rv = _VOP_(vop_sendfile, vp)((vp)->v_fbhv,f,off,ioflags,cnt,act,targ,cr) |
287 | #define VOP_SPLICE_READ(vp,f,pipe,cnt,fl,iofl,cr,rv) \ | 287 | #define VOP_SPLICE_READ(vp,f,o,pipe,cnt,fl,iofl,cr,rv) \ |
288 | rv = _VOP_(vop_splice_read, vp)((vp)->v_fbhv,f,pipe,cnt,fl,iofl,cr) | 288 | rv = _VOP_(vop_splice_read, vp)((vp)->v_fbhv,f,o,pipe,cnt,fl,iofl,cr) |
289 | #define VOP_SPLICE_WRITE(vp,f,pipe,cnt,fl,iofl,cr,rv) \ | 289 | #define VOP_SPLICE_WRITE(vp,f,o,pipe,cnt,fl,iofl,cr,rv) \ |
290 | rv = _VOP_(vop_splice_write, vp)((vp)->v_fbhv,f,pipe,cnt,fl,iofl,cr) | 290 | rv = _VOP_(vop_splice_write, vp)((vp)->v_fbhv,f,o,pipe,cnt,fl,iofl,cr) |
291 | #define VOP_BMAP(vp,of,sz,rw,b,n,rv) \ | 291 | #define VOP_BMAP(vp,of,sz,rw,b,n,rv) \ |
292 | rv = _VOP_(vop_bmap, vp)((vp)->v_fbhv,of,sz,rw,b,n) | 292 | rv = _VOP_(vop_bmap, vp)((vp)->v_fbhv,of,sz,rw,b,n) |
293 | #define VOP_OPEN(vp, cr, rv) \ | 293 | #define VOP_OPEN(vp, cr, rv) \ |