Disk sector manipulations...

Hi Gurus,

  1. Is there any way to find and reserve free disk sectors and tell filesystem that these sectors are used ( or protected ) ? I’m doing COW ( copy-on-write ) in Disk Upper level filter driver and I’m using these sectors as side-store space. Currently I’m reserving sectors by creating a file from user level and then getting file’s clusters. Is there any other way to reserve sectors without creating file ?
  2. I’m keeping [sector_num<=>sector_data] mappings in my side-store sectors. After defragmentation all this information is becoming unusable because of already invalid sector_numbers. How can I avoid this situation ? can I detect that the sector data is going to move it’s place ? I have to update my mapping tables :(. Maybe there is another good solution ?

Thanks beforehand,
Zohrab Broyan.


Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

1 - no - keeping them in a file is your best option. You can’t tell at
the disk level which sectors are and are not in use without
synchronizing with the file system, at which point you might as well
just use a file.

2 - if you’re going to remap the sectors at the disk level, then you’ll
need to be running all the time - even when the disk is defragmented.

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Zohrab Broyan
Sent: Friday, September 23, 2005 8:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk sector manipulations…

Hi Gurus,

  1. Is there any way to find and reserve free disk sectors and tell
    filesystem that these sectors are used ( or protected ) ? I’m doing COW
    ( copy-on-write ) in Disk Upper level filter driver and I’m using these
    sectors as side-store space. Currently I’m reserving sectors by creating
    a file from user level and then getting file’s clusters. Is there any
    other way to reserve sectors without creating file ?
  2. I’m keeping [sector_num<=>sector_data] mappings in my side-store
    sectors. After defragmentation all this information is becoming
    unusable because of already invalid sector_numbers. How can I avoid this
    situation ? can I detect that the sector data is going to move it’s
    place ? I have to update my mapping tables :(. Maybe there is another
    good solution ?

Thanks beforehand,
Zohrab Broyan.


Yahoo! for Good
Click here to donate http:</http:> to the
Hurricane Katrina relief effort. — Questions? First check the Kernel
Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are
currently subscribed to ntdev as: xxxxx@windows.microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

Yes you can. I did it. It is not so complicated.

As for defragementation, while the COW is active, just fail the MOVE_FILE
requests and all will be OK.

Using a file limits the space and adds extra overhead for the FSD when it is
not needed.

Jamey


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Friday, September 23, 2005 9:58 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Disk sector manipulations…

1 - no - keeping them in a file is your best option. You can’t tell at the
disk level which sectors are and are not in use without synchronizing with
the file system, at which point you might as well just use a file.

2 - if you’re going to remap the sectors at the disk level, then you’ll need
to be running all the time - even when the disk is defragmented.

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Zohrab Broyan
Sent: Friday, September 23, 2005 8:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk sector manipulations…

Hi Gurus,

  1. Is there any way to find and reserve free disk sectors and tell
    filesystem that these sectors are used ( or protected ) ? I’m doing COW (
    copy-on-write ) in Disk Upper level filter driver and I’m using these
    sectors as side-store space. Currently I’m reserving sectors by creating a
    file from user level and then getting file’s clusters. Is there any other
    way to reserve sectors without creating file ?

  2. I’m keeping [sector_num<=>sector_data] mappings in my side-store sectors.
    After defragmentation all this information is becoming unusable because of
    already invalid sector_numbers. How can I avoid this situation ? can I
    detect that the sector data is going to move it’s place ? I have to update
    my mapping tables :(. Maybe there is another good solution ?

Thanks beforehand,

Zohrab Broyan.


Yahoo! for Good
Click here to donate http:</http:> to the
Hurricane Katrina relief effort. — Questions? First check the Kernel
Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently
subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a
blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

How about locking the file from user space? It will make sure that file is not touched by the defrag process.

sid

Jamey Kirby wrote:
v:* {behavior:url(#default#VML);}o:* {behavior:url(#default#VML);}w:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}st1:*{behavior:url(#default#ieooui) }
Yes you can. I did it. It is not so complicated.

As for defragementation, while the COW is active, just fail the MOVE_FILE requests and all will be OK.

Using a file limits the space and adds extra overhead for the FSD when it is not needed.

Jamey

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Friday, September 23, 2005 9:58 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Disk sector manipulations…

1 - no - keeping them in a file is your best option. You can’t tell at the disk level which sectors are and are not in use without synchronizing with the file system, at which point you might as well just use a file.

2 - if you’re going to remap the sectors at the disk level, then you’ll need to be running all the time - even when the disk is defragmented.

-p

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Zohrab Broyan
Sent: Friday, September 23, 2005 8:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk sector manipulations…

Hi Gurus,

1. Is there any way to find and reserve free disk sectors and tell filesystem that these sectors are used ( or protected ) ? I’m doing COW ( copy-on-write ) in Disk Upper level filter driver and I’m using these sectors as side-store space. Currently I’m reserving sectors by creating a file from user level and then getting file’s clusters. Is there any other way to reserve sectors without creating file ?

2. I’m keeping [sector_num<=>sector_data] mappings in my side-store sectors. After defragmentation all this information is becoming unusable because of already invalid sector_numbers. How can I avoid this situation ? can I detect that the sector data is going to move it’s place ? I have to update my mapping tables :(. Maybe there is another good solution ?

Thanks beforehand,

Zohrab Broyan.

---------------------------------

Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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

---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

> Is there any way to find and reserve free disk sectors and tell filesystem that these sectors are used ( or protected ) ?
One of the (tried and tested) solutions is to mark the clusters as “bad” and work with their contents “manually”.
Yes, clumsy, but…

Regards,
Alex Shvedov

----- Original Message -----
From: Jamey Kirby
To: Windows System Software Devs Interest List
Sent: Friday, September 23, 2005 1:59 PM
Subject: RE: [ntdev] Disk sector manipulations…

Yes you can. I did it. It is not so complicated.

As for defragementation, while the COW is active, just fail the MOVE_FILE requests and all will be OK.

Using a file limits the space and adds extra overhead for the FSD when it is not needed.

Jamey


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Friday, September 23, 2005 9:58 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Disk sector manipulations…

1 - no - keeping them in a file is your best option. You can’t tell at the disk level which sectors are and are not in use without synchronizing with the file system, at which point you might as well just use a file.

2 - if you’re going to remap the sectors at the disk level, then you’ll need to be running all the time - even when the disk is defragmented.

-p


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Zohrab Broyan
Sent: Friday, September 23, 2005 8:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk sector manipulations…

Hi Gurus,

  1. Is there any way to find and reserve free disk sectors and tell filesystem that these sectors are used ( or protected ) ? I’m doing COW ( copy-on-write ) in Disk Upper level filter driver and I’m using these sectors as side-store space. Currently I’m reserving sectors by creating a file from user level and then getting file’s clusters. Is there any other way to reserve sectors without creating file ?

  2. I’m keeping [sector_num<=>sector_data] mappings in my side-store sectors. After defragmentation all this information is becoming unusable because of already invalid sector_numbers. How can I avoid this situation ? can I detect that the sector data is going to move it’s place ? I have to update my mapping tables :(. Maybe there is another good solution ?

Thanks beforehand,

Zohrab Broyan.


Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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

Bitmap.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@Home
Sent: Friday, September 23, 2005 1:30 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk sector manipulations…

Is there any way to find and reserve free disk sectors and tell filesystem
that these sectors are used ( or protected ) ?

One of the (tried and tested) solutions is to mark the clusters as “bad” and
work with their contents “manually”.

Yes, clumsy, but…

Regards,

Alex Shvedov

----- Original Message -----

From: Jamey mailto:xxxxx Kirby

To: Windows System mailto:xxxxx Software Devs Interest List

Sent: Friday, September 23, 2005 1:59 PM

Subject: RE: [ntdev] Disk sector manipulations…

Yes you can. I did it. It is not so complicated.

As for defragementation, while the COW is active, just fail the MOVE_FILE
requests and all will be OK.

Using a file limits the space and adds extra overhead for the FSD when it is
not needed.

Jamey



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Friday, September 23, 2005 9:58 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Disk sector manipulations…

1 - no - keeping them in a file is your best option. You can’t tell at the
disk level which sectors are and are not in use without synchronizing with
the file system, at which point you might as well just use a file.

2 - if you’re going to remap the sectors at the disk level, then you’ll need
to be running all the time - even when the disk is defragmented.

-p



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Zohrab Broyan
Sent: Friday, September 23, 2005 8:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk sector manipulations…

Hi Gurus,

1. Is there any way to find and reserve free disk sectors and tell
filesystem that these sectors are used ( or protected ) ? I’m doing COW (
copy-on-write ) in Disk Upper level filter driver and I’m using these
sectors as side-store space. Currently I’m reserving sectors by creating a
file from user level and then getting file’s clusters. Is there any other
way to reserve sectors without creating file ?

2. I’m keeping [sector_num<=>sector_data] mappings in my side-store sectors.
After defragmentation all this information is becoming unusable because of
already invalid sector_numbers. How can I avoid this situation ? can I
detect that the sector data is going to move it’s place ? I have to update
my mapping tables :(. Maybe there is another good solution ?

Thanks beforehand,

Zohrab Broyan.

_____

Yahoo! for Good
Click here to donate http:</http:> to the
Hurricane Katrina relief effort. — Questions? First check the Kernel
Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently
subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a
blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

Why not use a separate volume for side-store (private store) device


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@Home
Sent: Friday, September 23, 2005 1:30 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk sector manipulations…

Is there any way to find and reserve free disk sectors and tell
filesystem that these sectors are used ( or protected ) ?

One of the (tried and tested) solutions is to mark the clusters as “bad”
and work with their contents “manually”.

Yes, clumsy, but…

Regards,

Alex Shvedov

----- Original Message -----

From: Jamey Kirby mailto:xxxxx

To: Windows System Software Devs Interest List
mailto:xxxxx

Sent: Friday, September 23, 2005 1:59 PM

Subject: RE: [ntdev] Disk sector manipulations…

Yes you can. I did it. It is not so complicated.

As for defragementation, while the COW is active, just fail the
MOVE_FILE requests and all will be OK.

Using a file limits the space and adds extra overhead for the
FSD when it is not needed.

Jamey



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Friday, September 23, 2005 9:58 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Disk sector manipulations…

1 - no - keeping them in a file is your best option. You can’t
tell at the disk level which sectors are and are not in use without
synchronizing with the file system, at which point you might as well
just use a file.

2 - if you’re going to remap the sectors at the disk level, then
you’ll need to be running all the time - even when the disk is
defragmented.

-p



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Zohrab Broyan
Sent: Friday, September 23, 2005 8:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk sector manipulations…

Hi Gurus,

1. Is there any way to find and reserve free disk sectors and
tell filesystem that these sectors are used ( or protected ) ? I’m doing
COW ( copy-on-write ) in Disk Upper level filter driver and I’m using
these sectors as side-store space. Currently I’m reserving sectors by
creating a file from user level and then getting file’s clusters. Is
there any other way to reserve sectors without creating file ?

2. I’m keeping [sector_num<=>sector_data] mappings in my
side-store sectors. After defragmentation all this information is
becoming unusable because of already invalid sector_numbers. How can I
avoid this situation ? can I detect that the sector data is going to
move it’s place ? I have to update my mapping tables :(. Maybe there is
another good solution ?

Thanks beforehand,

Zohrab Broyan.

________________________________

Yahoo! for Good
Click here to donate http:</http:>
to the Hurricane Katrina relief effort. — Questions? First check the
Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are
currently subscribed to ntdev as: xxxxx@windows.microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

> Bitmap.
Well, yes, but it works.
Did I say “clumsy”?

Regards,
Alex Shvedov

----- Original Message -----
From: Jamey Kirby
To: Windows System Software Devs Interest List
Sent: Friday, September 23, 2005 4:53 PM
Subject: RE: [ntdev] Disk sector manipulations…

Bitmap.

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@Home
Sent: Friday, September 23, 2005 1:30 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk sector manipulations…

Is there any way to find and reserve free disk sectors and tell filesystem
that these sectors are used ( or protected ) ?
One of the (tried and tested) solutions is to mark the clusters as “bad” and
work with their contents “manually”.
Yes, clumsy, but…

Regards,
Alex Shvedov

----- Original Message -----
From: Jamey Kirby
To: Windows System Software Devs Interest List
Sent: Friday, September 23, 2005 1:59 PM
Subject: RE: [ntdev] Disk sector manipulations…

Yes you can. I did it. It is not so complicated.

As for defragementation, while the COW is active, just fail the MOVE_FILE
requests and all will be OK.

Using a file limits the space and adds extra overhead for the FSD when it is
not needed.

Jamey

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Friday, September 23, 2005 9:58 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Disk sector manipulations…

1 - no - keeping them in a file is your best option. You can’t tell at the
disk level which sectors are and are not in use without synchronizing with
the file system, at which point you might as well just use a file.

2 - if you’re going to remap the sectors at the disk level, then you’ll need
to be running all the time - even when the disk is defragmented.

-p

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Zohrab Broyan
Sent: Friday, September 23, 2005 8:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk sector manipulations…
Hi Gurus,

  1. Is there any way to find and reserve free disk sectors and tell
    filesystem that these sectors are used ( or protected ) ? I’m doing COW (
    copy-on-write ) in Disk Upper level filter driver and I’m using these
    sectors as side-store space. Currently I’m reserving sectors by creating a
    file from user level and then getting file’s clusters. Is there any other
    way to reserve sectors without creating file ?
  2. I’m keeping [sector_num<=>sector_data] mappings in my side-store sectors.
    After defragmentation all this information is becoming unusable because of
    already invalid sector_numbers. How can I avoid this situation ? can I
    detect that the sector data is going to move it’s place ? I have to update
    my mapping tables :(. Maybe there is another good solution ?

Thanks beforehand,
Zohrab Broyan.

Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. — Questions?
First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed to
ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email
to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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

The main Idea is to not use additional volumes or disk devices.
All side-store data will be kept in the existing volumes.

Zohrab Broyan.

Harish Arora wrote:
v:* {behavior:url(#default#VML);}o:* {behavior:url(#default#VML);}w:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}st1:*{behavior:url(#default#ieooui) }
Why not use a separate volume for side-store (private store) device

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@Home
Sent: Friday, September 23, 2005 1:30 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk sector manipulations…

> Is there any way to find and reserve free disk sectors and tell filesystem that these sectors are used ( or protected ) ?

One of the (tried and tested) solutions is to mark the clusters as “bad” and work with their contents “manually”.

Yes, clumsy, but…

Regards,

Alex Shvedov

----- Original Message -----

From: Jamey Kirby

To: Windows System Software Devs Interest List

Sent: Friday, September 23, 2005 1:59 PM

Subject: RE: [ntdev] Disk sector manipulations…

Yes you can. I did it. It is not so complicated.

As for defragementation, while the COW is active, just fail the MOVE_FILE requests and all will be OK.

Using a file limits the space and adds extra overhead for the FSD when it is not needed.

Jamey

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Friday, September 23, 2005 9:58 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Disk sector manipulations…

1 - no - keeping them in a file is your best option. You can’t tell at the disk level which sectors are and are not in use without synchronizing with the file system, at which point you might as well just use a file.

2 - if you’re going to remap the sectors at the disk level, then you’ll need to be running all the time - even when the disk is defragmented.

-p

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Zohrab Broyan
Sent: Friday, September 23, 2005 8:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk sector manipulations…

Hi Gurus,

1. Is there any way to find and reserve free disk sectors and tell filesystem that these sectors are used ( or protected ) ? I’m doing COW ( copy-on-write ) in Disk Upper level filter driver and I’m using these sectors as side-store space. Currently I’m reserving sectors by creating a file from user level and then getting file’s clusters. Is there any other way to reserve sectors without creating file ?

2. I’m keeping [sector_num<=>sector_data] mappings in my side-store sectors. After defragmentation all this information is becoming unusable because of already invalid sector_numbers. How can I avoid this situation ? can I detect that the sector data is going to move it’s place ? I have to update my mapping tables :(. Maybe there is another good solution ?

Thanks beforehand,

Zohrab Broyan.

---------------------------------

Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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

---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

Ok, good idea…, But how to write to $Bitmap File ?
I can read it using NtFsControlFile function specifying FSCTL_GET_VOLUME_BITMAP.

As for MOVE_FILE requests…, how can I handle MOVE_FILE requests to fail them ?

Thanks,
Zohrab.

Jamey Kirby wrote:
v:* {behavior:url(#default#VML);}o:* {behavior:url(#default#VML);}w:* {behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}st1:*{behavior:url(#default#ieooui) }
Bitmap…

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@Home
Sent: Friday, September 23, 2005 1:30 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Disk sector manipulations…

> Is there any way to find and reserve free disk sectors and tell filesystem that these sectors are used ( or protected ) ?

One of the (tried and tested) solutions is to mark the clusters as “bad” and work with their contents “manually”.

Yes, clumsy, but…

Regards,

Alex Shvedov

----- Original Message -----

From: Jamey Kirby

To: Windows System Software Devs Interest List

Sent: Friday, September 23, 2005 1:59 PM

Subject: RE: [ntdev] Disk sector manipulations…

Yes you can. I did it. It is not so complicated.

As for defragementation, while the COW is active, just fail the MOVE_FILE requests and all will be OK.

Using a file limits the space and adds extra overhead for the FSD when it is not needed.

Jamey

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Friday, September 23, 2005 9:58 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Disk sector manipulations…

1 - no - keeping them in a file is your best option. You can’t tell at the disk level which sectors are and are not in use without synchronizing with the file system, at which point you might as well just use a file.

2 - if you’re going to remap the sectors at the disk level, then you’ll need to be running all the time - even when the disk is defragmented.

-p

---------------------------------

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Zohrab Broyan
Sent: Friday, September 23, 2005 8:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Disk sector manipulations…

Hi Gurus,

1. Is there any way to find and reserve free disk sectors and tell filesystem that these sectors are used ( or protected ) ? I’m doing COW ( copy-on-write ) in Disk Upper level filter driver and I’m using these sectors as side-store space. Currently I’m reserving sectors by creating a file from user level and then getting file’s clusters. Is there any other way to reserve sectors without creating file ?

2. I’m keeping [sector_num<=>sector_data] mappings in my side-store sectors. After defragmentation all this information is becoming unusable because of already invalid sector_numbers. How can I avoid this situation ? can I detect that the sector data is going to move it’s place ? I have to update my mapping tables :(. Maybe there is another good solution ?

Thanks beforehand,

Zohrab Broyan.

---------------------------------

Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

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


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com