For FastIoLock, the parameter “Length” passed in is always {0xffffffff, 0xffffffff}.
Does it need extra process to fill the length area with the real file size.
I noticed that fastfat did nothing in FatFastLock…
Does anyone have a clue ?
BOOLEAN
xxxxFastIoLock (
IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PLARGE_INTEGER Length,
IN PEPROCESS Process,
IN ULONG Key,
IN BOOLEAN FailImmediately,
IN BOOLEAN ExclusiveLock,
OUT PIO_STATUS_BLOCK IoStatus,
IN PDEVICE_OBJECT DeviceObject )
Best wishes,
Matt Wu
You say “always” where you really should be saying “I have only seen”.
Length is a length in bytes for the lock and the MAXULONGLONG you’re
seeing is just shorthand for locking the entire file. There aren’t many
apps or situations which call for record level locking but there is no
reason why you can’t write something which uses LockFile in a more
interesting way.
File locks do not care about file size - they are a just a range lock on
the full 64bit integer space, shared/exclusive semantics of which are
enforced for IO on the non-paging read and write paths.
–
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: Matt Wu [mailto:mattwu@163.com]
Sent: Wednesday, March 06, 2002 9:00 AM
To: File Systems Developers
Subject: [ntfsd] FastIoLock …
For FastIoLock, the parameter “Length” passed in is always {0xffffffff,
0xffffffff}.
Does it need extra process to fill the length area with the real file
size.
I noticed that fastfat did nothing in FatFastLock…
Does anyone have a clue ?
BOOLEAN
xxxxFastIoLock (
IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PLARGE_INTEGER Length,
IN PEPROCESS Process,
IN ULONG Key,
IN BOOLEAN FailImmediately,
IN BOOLEAN ExclusiveLock,
OUT PIO_STATUS_BLOCK IoStatus,
IN PDEVICE_OBJECT DeviceObject )
Best wishes,
Matt Wu
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to %%email.unsub%%
>seeing is just shorthand for locking the entire file. There aren’t many
apps or situations which call for record level locking but there is no
MS Word and MSI Installer use locking and fail if the FSD does not support it.
Max