Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 939
b: refs/heads/master
c: 3f24376
h: refs/heads/master
i:
  937: 9b0b2b5
  935: dd934d1
v: v3
  • Loading branch information
Nathan Scott authored and Christoph Hellwig committed May 5, 2005
1 parent 7918ccb commit c18d421
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abd0cf7aeaaf8a15d9777e65606b6076868b6186
refs/heads/master: 3f243766660da3df4a75ea1892c310d6080646c8
43 changes: 41 additions & 2 deletions trunk/fs/xfs/linux-2.6/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,49 @@ linvfs_open_exec(
}
#endif /* HAVE_FOP_OPEN_EXEC */

/*
* Temporary workaround to the AIO direct IO write problem.
* This code can go and we can revert to do_sync_write once
* the writepage(s) rework is merged.
*/
STATIC ssize_t
linvfs_write(
struct file *filp,
const char __user *buf,
size_t len,
loff_t *ppos)
{
struct kiocb kiocb;
ssize_t ret;

init_sync_kiocb(&kiocb, filp);
kiocb.ki_pos = *ppos;
ret = __linvfs_write(&kiocb, buf, 0, len, kiocb.ki_pos);
*ppos = kiocb.ki_pos;
return ret;
}
STATIC ssize_t
linvfs_write_invis(
struct file *filp,
const char __user *buf,
size_t len,
loff_t *ppos)
{
struct kiocb kiocb;
ssize_t ret;

init_sync_kiocb(&kiocb, filp);
kiocb.ki_pos = *ppos;
ret = __linvfs_write(&kiocb, buf, IO_INVIS, len, kiocb.ki_pos);
*ppos = kiocb.ki_pos;
return ret;
}


struct file_operations linvfs_file_operations = {
.llseek = generic_file_llseek,
.read = do_sync_read,
.write = do_sync_write,
.write = linvfs_write,
.readv = linvfs_readv,
.writev = linvfs_writev,
.aio_read = linvfs_aio_read,
Expand All @@ -540,7 +579,7 @@ struct file_operations linvfs_file_operations = {
struct file_operations linvfs_invis_file_operations = {
.llseek = generic_file_llseek,
.read = do_sync_read,
.write = do_sync_write,
.write = linvfs_write_invis,
.readv = linvfs_readv_invis,
.writev = linvfs_writev_invis,
.aio_read = linvfs_aio_read_invis,
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_lrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,9 @@ xfs_write(
(xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ?
mp->m_rtdev_targp : mp->m_ddev_targp;

if (ioflags & IO_ISAIO)
return XFS_ERROR(-ENOSYS);

if ((pos & target->pbr_smask) || (count & target->pbr_smask))
return XFS_ERROR(-EINVAL);

Expand Down

0 comments on commit c18d421

Please sign in to comment.