Index: /branches/asyncio/src/client/usrint/pxfs.c
===================================================================
--- /branches/asyncio/src/client/usrint/pxfs.c	(revision 9428)
+++ /branches/asyncio/src/client/usrint/pxfs.c	(revision 9432)
@@ -533,7 +533,52 @@
 */
 
-//extern int pxfs_ftruncate (int fd, off_t length, pxfs_cb cb, void *cdat);
-
-//extern int pxfs_ftruncate64 (int fd, off64_t length, pxfs_cb cb, void *cdat);
+/**
+ * pxfs_ftruncate
+ */
+extern int pxfs_ftruncate(int fd, off_t length, pxfs_cb cb, void *cdat)
+{
+    return pxfs_ftruncate64(fd, (off64_t)length, cb, cdat);
+}
+
+/**
+ * pxfs_ftruncate64
+ */
+extern int pxfs_ftruncate64(int fd, off64_t length, pxfs_cb cb, void *cdat)
+{
+    pvfs_descriptor *pd;
+    struct pvfs_aiocb *truncate_acb = NULL;
+
+    if (fd < 0)
+    {
+        errno = EBADF;
+        return -1;
+    }
+
+    pd = pvfs_find_descriptor(fd);
+    if (!pd)
+    {
+        errno = EBADF;
+        return -1;
+    }
+
+    truncate_acb = malloc(sizeof(struct pvfs_aiocb));
+    if (!truncate_acb)
+    {
+        errno = ENOMEM;
+        return -1;
+    }
+    memset(truncate_acb, 0, sizeof(struct pvfs_aiocb));
+
+    truncate_acb->hints = PVFS_HINT_NULL;
+    truncate_acb->op_code = PVFS_AIO_TRUNC_OP;
+    truncate_acb->u.trunc.pd = pd;
+    truncate_acb->u.trunc.length = length;
+    truncate_acb->call_back_fn = cb;
+    truncate_acb->call_back_dat = cdat;
+
+    aiocommon_submit_op(truncate_acb);
+
+    return 0;
+}
 
 /*
Index: /branches/asyncio/src/client/usrint/aiocommon.c
===================================================================
--- /branches/asyncio/src/client/usrint/aiocommon.c	(revision 9428)
+++ /branches/asyncio/src/client/usrint/aiocommon.c	(revision 9432)
@@ -197,4 +197,14 @@
             break;
         }
+        case PVFS_AIO_TRUNC_OP:
+        {
+            rc = PVFS_isys_truncate(p_cb->u.trunc.pd->s->pvfs_ref,
+                                    p_cb->u.trunc.length,
+                                    cred,
+                                    &(p_cb->op_id),
+                                    p_cb->hints,
+                                    (void *)p_cb); 
+            break;
+        }
         case PVFS_AIO_STAT_OP:
         {   
@@ -309,4 +319,8 @@
             free(p_cb->u.rename.newdir);
             free(p_cb->u.rename.newname);
+            break;
+        }
+        case PVFS_AIO_TRUNC_OP:
+        {
             break;
         }
Index: /branches/asyncio/src/client/usrint/aiocommon.h
===================================================================
--- /branches/asyncio/src/client/usrint/aiocommon.h	(revision 9428)
+++ /branches/asyncio/src/client/usrint/aiocommon.h	(revision 9432)
@@ -36,8 +36,8 @@
     PVFS_AIO_OPEN_OP,
     PVFS_AIO_RENAME_OP,
+    PVFS_AIO_TRUNC_OP,
     PVFS_AIO_STAT_OP,
     PVFS_AIO_STAT64_OP,
 } PVFS_aio_op_code;
-
 
 /* the following structures contain operation dependent data for aio calls */
@@ -80,4 +80,10 @@
 };
 
+struct PINT_aio_trunc_cb
+{
+    pvfs_descriptor *pd;    /* in */
+    off64_t length;         /* in */
+};
+
 struct PINT_aio_stat_cb
 {
@@ -108,4 +114,5 @@
         struct PINT_aio_open_cb open;
         struct PINT_aio_rename_cb rename;
+        struct PINT_aio_trunc_cb trunc;
         struct PINT_aio_stat_cb stat;
     } u;
