CcCopyWrite cause IRP_MJ_READ

Hi all,

I am facing a problem when I call CcCopyWrite, IRP_MJ_READ is called from
Cache manager even the write request
to new created file.

I noticed that CcCopyWrite does not cause IRP_MJ_READ in case FAT or NTFS.
How can I prevent the IRP_MJ_READ from Cache Manager ?

I have compared Fcb->Header.AllocationSize, Fcb->Header.FileSize,
Fcb->Header.ValidDataLength along with the flows of FastFat, but could not
find any clue for this problem.

Thanks,

Eddie

Hi Eddie,
Are you sure the IRP_MJ_READ from Cache mgr? Is it a PAGING_IO?
I thinks it is a PAGING_IO from VM! The CcCopyWrite to the Cache mgr find
there is not a map for the destination file, then create one from VM and
continue the copywrite function, Now the VM got a Page Fault, the the
IRP_PAGING_IO to the Read dispatch. Correct me please!

2006/9/21, EddieShim :
>
> Hi all,
>
> I am facing a problem when I call CcCopyWrite, IRP_MJ_READ is called from
> Cache manager even the write request
> to new created file.
>
> I noticed that CcCopyWrite does not cause IRP_MJ_READ in case FAT or NTFS.
> How can I prevent the IRP_MJ_READ from Cache Manager ?
>
> I have compared Fcb->Header.AllocationSize, Fcb->Header.FileSize,
> Fcb->Header.ValidDataLength along with the flows of FastFat, but could not
> find any clue for this problem.
>
> Thanks,
>
> Eddie
>
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Hi,

Thanks for your reply.

It was a PAGING_IO from VM as you thought.
I didn’t check whether it’s from VM or CM, just consider why read is requested.

Still I have question,
Why I could not see the IRP_MJ_READ on FAT or NTFS for same case with my FSD ?

Regards,

Eddie

“Steven David” wrote in message news:xxxxx@ntfsd…
Hi Eddie,
Are you sure the IRP_MJ_READ from Cache mgr? Is it a PAGING_IO?
I thinks it is a PAGING_IO from VM! The CcCopyWrite to the Cache mgr find there is not a map for the destination file, then create one from VM and continue the copywrite function, Now the VM got a Page Fault, the the IRP_PAGING_IO to the Read dispatch. Correct me please!

2006/9/21, EddieShim :
Hi all,

I am facing a problem when I call CcCopyWrite, IRP_MJ_READ is called from
Cache manager even the write request
to new created file.

I noticed that CcCopyWrite does not cause IRP_MJ_READ in case FAT or NTFS.
How can I prevent the IRP_MJ_READ from Cache Manager ?

I have compared Fcb->Header.AllocationSize, Fcb-> Header.FileSize,
Fcb->Header.ValidDataLength along with the flows of FastFat, but could not
find any clue for this problem.

Thanks,

Eddie


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@gmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

I setted Fcb->Header.ValidDataLength before call CcCopyWrite. :frowning:
“Steven David” wrote in message news:xxxxx@ntfsd…
Hi Eddie,
Are you sure the IRP_MJ_READ from Cache mgr? Is it a PAGING_IO?
I thinks it is a PAGING_IO from VM! The CcCopyWrite to the Cache mgr find there is not a map for the destination file, then create one from VM and continue the copywrite function, Now the VM got a Page Fault, the the IRP_PAGING_IO to the Read dispatch. Correct me please!

2006/9/21, EddieShim :
Hi all,

I am facing a problem when I call CcCopyWrite, IRP_MJ_READ is called from
Cache manager even the write request
to new created file.

I noticed that CcCopyWrite does not cause IRP_MJ_READ in case FAT or NTFS.
How can I prevent the IRP_MJ_READ from Cache Manager ?

I have compared Fcb->Header.AllocationSize, Fcb-> Header.FileSize,
Fcb->Header.ValidDataLength along with the flows of FastFat, but could not
find any clue for this problem.

Thanks,

Eddie


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@gmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

I think It will be the same case on the FAT or NTFS.When the VMM got a Page Fault, It will take the long routine IRP to get the information of file.

>I setted Fcb->Header.ValidDataLength before call CcCopyWrite.

Depending on the ValidDataLength the Cache Manager decides whether pages from the pool of zeroed pages must be used for the first and last page of the mapped region or pages must be read from a file.


Slava Imameyev, xxxxx@hotmail.com

“EddieShim” wrote in message news:xxxxx@ntfsd…
I setted Fcb->Header.ValidDataLength before call CcCopyWrite. :frowning:
“Steven David” wrote in message news:xxxxx@ntfsd…
Hi Eddie,
Are you sure the IRP_MJ_READ from Cache mgr? Is it a PAGING_IO?
I thinks it is a PAGING_IO from VM! The CcCopyWrite to the Cache mgr find there is not a map for the destination file, then create one from VM and continue the copywrite function, Now the VM got a Page Fault, the the IRP_PAGING_IO to the Read dispatch. Correct me please!

2006/9/21, EddieShim :
Hi all,

I am facing a problem when I call CcCopyWrite, IRP_MJ_READ is called from
Cache manager even the write request
to new created file.

I noticed that CcCopyWrite does not cause IRP_MJ_READ in case FAT or NTFS.
How can I prevent the IRP_MJ_READ from Cache Manager ?

I have compared Fcb->Header.AllocationSize, Fcb-> Header.FileSize,
Fcb->Header.ValidDataLength along with the flows of FastFat, but could not
find any clue for this problem.

Thanks,

Eddie


Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@gmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

By setting VDL for the file BEFORE the write, the OP was telling the VM
system “I have data in this region” and thus when writing to partial
pages, the MM realized it had to fetch that page BEFORE modifying it so
that the extra data would still be in the page. Having VDL set to zero
at the start means that the rest of the page just didn’t matter.

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com http:</http:>


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Slava Imameyev
Sent: Thursday, September 21, 2006 3:30 AM
To: ntfsd redirect
Subject: Re:[ntfsd] CcCopyWrite cause IRP_MJ_READ

I setted Fcb->Header.ValidDataLength before call CcCopyWrite.

Depending on the ValidDataLength the Cache Manager decides whether
pages from the pool of zeroed pages must be used for the first and last
page of the mapped region or pages must be read from a file.


Slava Imameyev, xxxxx@hotmail.com

“EddieShim” wrote in message
news:xxxxx@ntfsd…

I setted Fcb->Header.ValidDataLength before call CcCopyWrite. :frowning:

“Steven David” wrote in message
news:xxxxx@ntfsd…

Hi Eddie,

Are you sure the IRP_MJ_READ from Cache mgr? Is it a
PAGING_IO?

I thinks it is a PAGING_IO from VM! The CcCopyWrite to
the Cache mgr find there is not a map for the destination file, then
create one from VM and continue the copywrite function, Now the VM got a
Page Fault, the the IRP_PAGING_IO to the Read dispatch. Correct me
please!

2006/9/21, EddieShim :

Hi all,

I am facing a problem when I call CcCopyWrite,
IRP_MJ_READ is called from
Cache manager even the write request
to new created file.

I noticed that CcCopyWrite does not cause IRP_MJ_READ in
case FAT or NTFS.
How can I prevent the IRP_MJ_READ from Cache Manager ?

I have compared Fcb->Header.AllocationSize, Fcb->
Header.FileSize,
Fcb->Header.ValidDataLength along with the flows of
FastFat, but could not
find any clue for this problem.

Thanks,

Eddie


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as:
xxxxx@gmail.com
To unsubscribe send a blank email to
xxxxx@lists.osr.com


Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com