IRP_MJ_SET_INFORMATION - FileValidDataLengthInformation

I’m trying to issue a IRP_MJ_SET_INFORMATION with
FileValidDataLengthInformation inside of my filter. The call is always
returning STATUS_INVALID_PARAMETER, even though I am using a file object
opened for a new file. Has anyone had any experience in getting this to
work? The environment is Windows XP SP2.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com

Hi Don,

Some things to check:

Was SE_MANAGE_VOLUMES priv enabled at the time the file was opened?
(Necessary from user mode–might not be necessary from kernel mode,
depending on how the check is implemented in the file system)

Is the file compressed or sparse? If so you can’t set valid data length.

Is the file on a local volume?

  • Dan.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Monday, January 29, 2007 8:02 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] IRP_MJ_SET_INFORMATION - FileValidDataLengthInformation

I’m trying to issue a IRP_MJ_SET_INFORMATION with
FileValidDataLengthInformation inside of my filter. The call is always
returning STATUS_INVALID_PARAMETER, even though I am using a file object
opened for a new file. Has anyone had any experience in getting this to
work? The environment is Windows XP SP2.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting http://www.windrvr.com


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

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

Dan,

I don’t know about SE_MANAGE_VOLUMES since this was a kernel open.
The file is not compressed or sparse and is on the local volume. In fact
the file was created as part of the open. I’ve traced through the kernel
code for this and it appears that even though I opened a file, NTFS
considers the open to be a “UserVolumeOpen” instead of a “UserFileOpen” and
rejects it.

My problem is I have no clue how a FltCreateFile creating a new file
can be considered a volume open.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com

“Dan Kyler” wrote in message news:xxxxx@ntfsd…
> Hi Don,
>
> Some things to check:
>
> Was SE_MANAGE_VOLUMES priv enabled at the time the file was opened?
> (Necessary from user mode–might not be necessary from kernel mode,
> depending on how the check is implemented in the file system)
>
> Is the file compressed or sparse? If so you can’t set valid data length.
>
> Is the file on a local volume?
>
> - Dan.
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
> Sent: Monday, January 29, 2007 8:02 AM
> To: Windows File Systems Devs Interest List
> Subject: [ntfsd] IRP_MJ_SET_INFORMATION - FileValidDataLengthInformation
>
>
> I’m trying to issue a IRP_MJ_SET_INFORMATION with
> FileValidDataLengthInformation inside of my filter. The call is always
> returning STATUS_INVALID_PARAMETER, even though I am using a file object
> opened for a new file. Has anyone had any experience in getting this to
> work? The environment is Windows XP SP2.
>
>
> –
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting http://www.windrvr.com
>
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@privtek.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Is it possible to query this information for same file from the user mode?