How to modify the FS IO data changing its length

Hello all:
I have written a filter driver to modify the IO data of the Hard disk, but
I find I can’t change the IO data’s Length, it means I can’t add a string to
the IO data (I can only modify it without change its length). Could you
please tell me how to change the IO data’s Length in my filter driver?
Thanks a lot.~_~
My code is as below:

typedef struct _IO_CONTEXT {
PMDL OriginalMDL;
PVOID pIOBuffer;
PVOID User;
PVOID OriginalBuf;
PRECORD_LIST recordList;
} IO_CONTEXT, *PIO_CONTEXT;

DBGSTATIC
VOID
WriteOrig(
IN PIRP Irp
)
{
PIO_STACK_LOCATION pIrpStack;
pIrpStack = IoGetCurrentIrpStackLocation(Irp);
ULONG unWriteLength = pIrpStack->Parameters.Write.Length;

PIO_CONTEXT pIOContext

CHAR pLogo = “Logo to indicate the file has been modified by my filter”;
ULONG unAddBufSize = sizeof(pLogo)-1;

PMDL pNewMdl;

pIOContext->OriginalMDL = NULL;
pIOContext->OriginalBuf = NULL;

if(pIrpStack->MajorFunction == IRP_MJ_WRITE)
{
if((Irp->Flags & (IRP_NOCACHE | IRP_PAGING_IO |
IRP_SYNCHRONOUS_PAGING_IO))
&& pIrpStack->FileObject->FileName.Length>1)
{
if(Irp->MdlAddress != NULL)
pbuf = MmGetSystemAddressForMdlSafe(Irp->MdlAddress,
NormalPagePriority );
else
pbuf = Irp->UserBuffer;

pIOContext->pIOBuffer =
ExAllocatePoolWithTag(NonPagedPool,unWriteLength+unAddBufSize,1);

//I modified the write length here but it didn’t work
pIrpStack->Parameters.Write.Length = unWriteLength+unAddBufSize;
Irp->IoStatus.Information = unWriteLength+unAddBufSize;

//copy the logo to IOBuffer
RtlCopyMemory(pIOContext->pIOBuffer, pLogo, unAddBufSize);
//copy the original IO data to IOBuffer
RtlCopyMemory((PVOID)((CHAR*)(pIOContext->pIOBuffer)+unAddBufSize),
pbuf, unWriteLength);

// save the original Mdl
pIOContext->OriginalMDL = Irp->MdlAddress;
pIOContext->OriginalBuf = Irp->UserBuffer;
Irp->MdlAddress = NULL;

//build a new MDL
pNewMdl = IoAllocateMdl( pIOContext->pIOBuffer,
unWriteLength+unAddBufSize, FALSE, TRUE, Irp );
MmBuildMdlForNonPagedPool(pNewMdl);
MmProbeAndLockPages(Irp->MdlAddress,
Irp->RequestorMode,IoReadAccess);

//Lock the user address space
pIOContext->User = MmMapLockedPages(Irp->MdlAddress,
Irp->RequestorMode);
Irp->UserBuffer = MmGetMdlVirtualAddress(pNewMdl);
}
}
return;
}

DBGSTATIC
VOID
WriteComp(
IN PIRP Irp,
IN PIO_CONTEXT pIOContext
)
{
if(pIOContext != NULL)
{
if(pIOContext->OriginalMDL != NULL || pIOContext->OriginalBuf != NULL)
{
MmUnmapLockedPages(pIOContext->User, Irp->MdlAddress);
MmUnlockPages(Irp->MdlAddress);
IoFreeMdl(Irp->MdlAddress);
Irp->MdlAddress = pIOContext->OriginalMDL;
Irp->UserBuffer = pIOContext->OriginalBuf;
}
if(pIOContext->pIOBuffer != NULL)
ExFreePool(pIOContext->pIOBuffer);

pIOContext->recordList = NULL;
ExFreePool(pIOContext);
pIOContext = NULL;
}
return;
}