EndOfFile vs. Allocate size

Hello,
I was under the impression that a file’s AllocationSize could be
changed (via IRP_MJ_SET_INFORMATION) without affecting the EndOfFile size.
However, I’ve noticed that when I recieve an
IRP_MJ_SET_INFORMATION/FileAllocationInformation setting a file’s allocation
size to zero, the EndOfFile size is also set to zero. Is this a special
case side effect or am I missing something? What are the rules here?

Thanks,
Joel

Joel,

EOF must be <= Allocation Size. Thus, if someone sets the allocation size
to zero, the EOF must also be set to zero to ensure conformance with the
rule.

Regards,

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com http:

-----Original Message-----
From: Smith, Joel [mailto:xxxxx@ntpsoftware.com]
Sent: Wednesday, June 07, 2000 3:19 PM
To: File Systems Developers
Subject: [ntfsd] EndOfFile vs. Allocate size

Hello,
I was under the impression that a file’s AllocationSize could be
changed (via IRP_MJ_SET_INFORMATION) without affecting the EndOfFile size.
However, I’ve noticed that when I recieve an
IRP_MJ_SET_INFORMATION/FileAllocationInformation setting a file’s allocation
size to zero, the EndOfFile size is also set to zero. Is this a special
case side effect or am I missing something? What are the rules here?

Thanks,
Joel</http:>

EOF will often be > Allocation Size for compressed files

-----Original Message-----
From: Tony Mason [mailto:xxxxx@osr.com]
Sent: Wednesday, June 07, 2000 3:27 PM
To: File Systems Developers
Subject: [ntfsd] RE: EndOfFile vs. Allocate size

Joel,

EOF must be <= Allocation Size. Thus, if someone sets the allocation size
to zero, the EOF must also be set to zero to ensure conformance with the
rule.

Regards,

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com http:

-----Original Message-----
From: Smith, Joel [mailto:xxxxx@ntpsoftware.com]
Sent: Wednesday, June 07, 2000 3:19 PM
To: File Systems Developers
Subject: [ntfsd] EndOfFile vs. Allocate size

Hello,
I was under the impression that a file’s AllocationSize could be
changed (via IRP_MJ_SET_INFORMATION) without affecting the EndOfFile size.
However, I’ve noticed that when I recieve an
IRP_MJ_SET_INFORMATION/FileAllocationInformation setting a file’s allocation
size to zero, the EndOfFile size is also set to zero. Is this a special
case side effect or am I missing something? What are the rules here?

Thanks,
Joel


You are currently subscribed to ntfsd as: xxxxx@congruent.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)</http:>

EOF is > allocation size in case the filesystem
supports sparse file.

— Arthur Kreitman wrote:
> EOF will often be > Allocation Size for
> compressed files
>
> -----Original Message-----
> From: Tony Mason [mailto:xxxxx@osr.com]
> Sent: Wednesday, June 07, 2000 3:27 PM
> To: File Systems Developers
> Subject: [ntfsd] RE: EndOfFile vs. Allocate size
>
>
> Joel,
>
> EOF must be <= Allocation Size. Thus, if someone
> sets the allocation size
> to zero, the EOF must also be set to zero to ensure
> conformance with the
> rule.
>
> Regards,
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com http:
>
>
> -----Original Message-----
> From: Smith, Joel [mailto:xxxxx@ntpsoftware.com]
> Sent: Wednesday, June 07, 2000 3:19 PM
> To: File Systems Developers
> Subject: [ntfsd] EndOfFile vs. Allocate size
>
>
>
> Hello,
> I was under the impression that a file’s
> AllocationSize could be
> changed (via IRP_MJ_SET_INFORMATION) without
> affecting the EndOfFile size.
> However, I’ve noticed that when I recieve an
> IRP_MJ_SET_INFORMATION/FileAllocationInformation
> setting a file’s allocation
> size to zero, the EndOfFile size is also set to
> zero. Is this a special
> case side effect or am I missing something? What
> are the rules here?
>
> Thanks,
> Joel
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@congruent.com
> To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
>

__________________________________________________
Do You Yahoo!?
Yahoo! Photos – now, 100 FREE prints!
http://photos.yahoo.com</http:>

Careful.

Yes, the two numbers:

* clusters allocated to the file on disc
* size of the valid bytespace of the file

can hold the relation Anand and Arthur suspect BUT this is not the
definition of the numbers in the FSRTL_COMMON_FCB_HEADER.

These numbers are for the interaction between the filesystem and cache
manager/fast io. For fast io, AllocationSize indicates how far the file
may be grown before we have to force the slow path so the filesystem can
grow the AllocationSize - the file can be extended outside the
filesystem. AllocationSize thus also controls the size of the underlying
mapped section which caches the file - mapping beyond it is fatal. All
streams MUST hold the relationship

FileSize <= AllocationSize

as Tony says.

To Joel’s original question, the set allocationsize call doesn’t
sparsify the tail of a file - yep, it moves them in tandem when the
motion implies that.

-----Original Message-----
From: Gurpreet Anand [mailto:xxxxx@yahoo.com]
Sent: Friday, June 09, 2000 9:58 AM
To: File Systems Developers
Subject: [ntfsd] RE: EndOfFile vs. Allocate size

EOF is > allocation size in case the filesystem
supports sparse file.

— Arthur Kreitman wrote:
> EOF will often be > Allocation Size for
> compressed files
>
> -----Original Message-----
> From: Tony Mason [mailto:xxxxx@osr.com]
> Sent: Wednesday, June 07, 2000 3:27 PM
> To: File Systems Developers
> Subject: [ntfsd] RE: EndOfFile vs. Allocate size
>
>
> Joel,
>
> EOF must be <= Allocation Size. Thus, if someone
> sets the allocation size
> to zero, the EOF must also be set to zero to ensure
> conformance with the
> rule.
>
> Regards,
>
> Tony Mason
> Consulting Partner
> OSR Open Systems Resources, Inc.
> http://www.osr.com http:
>
>
> -----Original Message-----
> From: Smith, Joel [mailto:xxxxx@ntpsoftware.com]
> Sent: Wednesday, June 07, 2000 3:19 PM
> To: File Systems Developers
> Subject: [ntfsd] EndOfFile vs. Allocate size
>
>
>
> Hello,
> I was under the impression that a file’s
> AllocationSize could be
> changed (via IRP_MJ_SET_INFORMATION) without
> affecting the EndOfFile size.
> However, I’ve noticed that when I recieve an
> IRP_MJ_SET_INFORMATION/FileAllocationInformation
> setting a file’s allocation
> size to zero, the EndOfFile size is also set to
> zero. Is this a special
> case side effect or am I missing something? What
> are the rules here?
>
> Thanks,
> Joel
>
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@congruent.com
> To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
>
> —
> You are currently subscribed to ntfsd as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
>

__________________________________________________
Do You Yahoo!?
Yahoo! Photos – now, 100 FREE prints!
http://photos.yahoo.com


You are currently subscribed to ntfsd as: xxxxx@exchange.microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)</http:>