how to access the raw partition

http://blogs.msdn.com/doronh/default.aspx

“Maxim S. Shatskih” schrieb im Newsbeitrag news:xxxxx@ntdev…
>> Everyone here should read Doron’s blog. This week it has been about Unicode
>
> Can you name us the URL?
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
>

If you want me to write on anything in particular please let me know (on
the blog under the suggestions entry).

Thx for reading :wink:

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Sunday, March 05, 2006 2:10 PM
To: Windows System Software Devs Interest List
Subject: Re: Re:[ntdev] Re:how to access the raw partition

Everyone here should read Doron’s blog. This week it has been about
Unicode

Can you name us the URL?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

And as Max asked: what’s the address?

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Sunday, March 05, 2006 8:44 PM
To: Windows System Software Devs Interest List
Subject: RE: Re:[ntdev] Re:how to access the raw partition

If you want me to write on anything in particular please let me know (on
the blog under the suggestions entry).

Thx for reading :wink:

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Sunday, March 05, 2006 2:10 PM
To: Windows System Software Devs Interest List
Subject: Re: Re:[ntdev] Re:how to access the raw partition

Everyone here should read Doron’s blog. This week it has been about
Unicode

Can you name us the URL?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Somebody else posted it yesterday…it is http://blogs.msdn.com/doronh/

thx
d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Monday, March 06, 2006 7:09 AM
To: Windows System Software Devs Interest List
Subject: RE: Re:[ntdev] Re:how to access the raw partition

And as Max asked: what’s the address?

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Sunday, March 05, 2006 8:44 PM
To: Windows System Software Devs Interest List
Subject: RE: Re:[ntdev] Re:how to access the raw partition

If you want me to write on anything in particular please let me know (on
the blog under the suggestions entry).

Thx for reading :wink:

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Sunday, March 05, 2006 2:10 PM
To: Windows System Software Devs Interest List
Subject: Re: Re:[ntdev] Re:how to access the raw partition

Everyone here should read Doron’s blog. This week it has been about
Unicode

Can you name us the URL?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

xxxxx@Home wrote:

Without going any further:

> FileNameLength = sizeof(PathPrefix);

This sets FileNameLength to 4, which is NOT what you want.
It’s all stupid C/C++: WCHAR PathPrefix is treated by the compiler
as a pointer (to WCHAR, but this does not matter here).

This is NOT true. There are many case in which an array can be silently
treated as a pointer, but arrays and pointers are NOT identical. This
is one of the most deeply-held misunderstandings about C.

C:\tmp>type x.cpp
#include <stdio.h>

int main()
{
wchar_t xyz = L"abcdefhijkl";
printf( “Sizeof xyz is %d\n”, sizeof(xyz) );
return 0;
}

C:\tmp>cl x.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
14.00.50727.42 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

x.cpp
Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

/out:x.exe
x.obj

C:\tmp>x
Sizeof xyz is 24

C:\tmp>


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.</stdio.h>

Tim is absolutely right. I wrote about this last week.

When is a string constant not really constant?
http://blogs.msdn.com/doronh/archive/2006/03/02/542785.aspx

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, March 06, 2006 9:15 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] how to access the raw partition

xxxxx@Home wrote:

Without going any further:

> FileNameLength = sizeof(PathPrefix);

This sets FileNameLength to 4, which is NOT what you want.
It’s all stupid C/C++: WCHAR PathPrefix is treated by the compiler
as a pointer (to WCHAR, but this does not matter here).

This is NOT true. There are many case in which an array can be silently
treated as a pointer, but arrays and pointers are NOT identical. This
is one of the most deeply-held misunderstandings about C.

C:\tmp>type x.cpp
#include <stdio.h>

int main()
{
wchar_t xyz = L"abcdefhijkl";
printf( “Sizeof xyz is %d\n”, sizeof(xyz) );
return 0;
}

C:\tmp>cl x.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
14.00.50727.42 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

x.cpp
Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

/out:x.exe
x.obj

C:\tmp>x
Sizeof xyz is 24

C:\tmp>


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</stdio.h>

> This is NOT true. There are many case in which an array can be silently

treated as a pointer, but arrays and pointers are NOT identical.
Gosh, I was in a hurry…
Right you are, and not only once I used the same construct you are using in
xyz.

Later I gave the OP a working snippet anyway…

Anyway, I certainly do not want to start a thread about arrays
vs ptrs in C, it simply does not belong here.

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, March 06, 2006 1:00 PM
Subject: RE: [ntdev] how to access the raw partition

Tim is absolutely right. I wrote about this last week.

When is a string constant not really constant?
http://blogs.msdn.com/doronh/archive/2006/03/02/542785.aspx

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, March 06, 2006 9:15 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] how to access the raw partition

xxxxx@Home wrote:

> Without going any further:
>
> > FileNameLength = sizeof(PathPrefix);
>
> This sets FileNameLength to 4, which is NOT what you want.
> It’s all stupid C/C++: WCHAR PathPrefix is treated by the compiler
> as a pointer (to WCHAR, but this does not matter here).

This is NOT true. There are many case in which an array can be silently
treated as a pointer, but arrays and pointers are NOT identical. This
is one of the most deeply-held misunderstandings about C.

C:\tmp>type x.cpp
#include <stdio.h>

int main()
{
wchar_t xyz = L"abcdefhijkl";
printf( “Sizeof xyz is %d\n”, sizeof(xyz) );
return 0;
}

C:\tmp>cl x.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
14.00.50727.42 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

x.cpp
Microsoft (R) Incremental Linker Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.

/out:x.exe
x.obj

C:\tmp>x
Sizeof xyz is 24

C:\tmp>


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</stdio.h>

Yes you can use the symbolic link name.

When is your filter driver running this code? Are you doing this during
boot? If so there’s a strong chance that the disk drivers won’t have
been initialized yet in which case you can’t see the partitions.

Can you step back a second and explain what your filter driver is trying
to do that you need to open a raw partition by name and write to it?
What are you filtering? What is it you’re trying to write to the disk?
There’s been a lot of focus on your use of UNICODE_STRING, but i’m more
curious about whether the goal you’re chasing is really going to get you
what you want.

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of yuvraj rege
Sent: Sunday, March 05, 2006 1:47 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] how to access the raw partition

Hello Sir ,
I have tried the pathname “\Device\Harddisk0\Partition2”. Now the
syntax problem is solved because I have used
FileName.Length= FileName.Length - sizeof(WCHAR);
to ommit the NULL from my path.
But this time the new result encountered is STATUS_OBJECT_NOT_FOUND.
I am using Device Tree for finding right object .How can I find the
right object?
Can I use the sysmbolic link? I am doubtfull about that.

Regards
Yuvraj Rege

NTSTATUS
WcdCreate(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
{

UNICODE_STRING FileName;

NTSTATUS ntStatus;
HANDLE FileHandle;
OBJECT_ATTRIBUTES ObjectAttributes;
WCHAR PathPrefix =
L"\Device\Harddisk0\Partition2";
ULONG FileNameLength;
IO_STATUS_BLOCK IoStatus;
char *result;

UNREFERENCED_PARAMETER(DeviceObject);
Irp->IoStatus.Status = STATUS_SUCCESS;
file://ZwCreateFile stuff
RtlInitUnicodeString(&FileName, PathPrefix);
FileName.Length= FileName.Length - sizeof(WCHAR);

InitializeObjectAttributes ( &ObjectAttributes,
&FileName,
OBJ_CASE_INSENSITIVE,
NULL,
NULL );

ntStatus= ZwCreateFile(
&FileHandle,
FILE_READ_DATA | FILE_WRITE_DATA,
&ObjectAttributes,
&IoStatus,
NULL,
FILE_ATTRIBUTE_NORMAL,
0,
FILE_OPEN_IF,
FILE_NON_DIRECTORY_FILE,
NULL,
0
);

result=OsrNTStatusToString(ntStatus);

DbgPrint(“\n\n%s”,result);

ZwClose( FileHandle );

DbgPrint(“\n\nWCD : WCD_Create called”);
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
} // end WcdCreate()


Jiyo cricket on Yahoo! India cricket
http:cricket/>
Yahoo! Messenger Mobile
http:hoo.com/new/messenger/> Stay in touch with your buddies all the time.
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</http:></http:>

Thank you for the interesting blog, Doron!

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Doron Holan”
To: “Windows System Software Devs Interest List”
Sent: Monday, March 06, 2006 5:43 AM
Subject: RE: Re:[ntdev] Re:how to access the raw partition

If you want me to write on anything in particular please let me know (on
the blog under the suggestions entry).

Thx for reading :wink:

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
Shatskih
Sent: Sunday, March 05, 2006 2:10 PM
To: Windows System Software Devs Interest List
Subject: Re: Re:[ntdev] Re:how to access the raw partition

> Everyone here should read Doron’s blog. This week it has been about
Unicode

Can you name us the URL?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

> This is NOT true. There are many case in which an array can be silently

treated as a pointer, but arrays and pointers are NOT identical.

Array is treated as a pointer only in value context.

sizeof() is not a value context.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Is this true that ZwCreateFile or ZwReadFile/ZwWriteFile works only for the recognised/formatted partitions?
Can’t I use these functions with unformatted partitions?
Please tell me if there is any other way for accessing unformatted partitions?
I want to use unformatted partition as a nonvolatile buffer for I/O operations in my filter driver. Actually I want to avoid the overhead of seek and latencies
causes due to fragmentation of partitions.Thats why I want to use unformatted contiguous space in the harddisk.

How can I use the symbolic link for getting the named object of unformatted partition so that I can use it in ZwCreateFile call?

Regards

Mrunal Rege

Peter Wieland wrote:
Yes you can use the symbolic link name.

When is your filter driver running this code? Are you doing this during boot? If so there’s a strong chance that the disk drivers won’t have been initialized yet in which case you can’t see the partitions.

Can you step back a second and explain what your filter driver is trying to do that you need to open a raw partition by name and write to it? What are you filtering? What is it you’re trying to write to the disk? There’s been a lot of focus on your use of UNICODE_STRING, but i’m more curious about whether the goal you’re chasing is really going to get you what you want.

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of yuvraj rege
Sent: Sunday, March 05, 2006 1:47 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] how to access the raw partition

Hello Sir ,
I have tried the pathname “\Device\Harddisk0\Partition2”. Now the syntax problem is solved because I have used
FileName.Length= FileName.Length - sizeof(WCHAR);
to ommit the NULL from my path.
But this time the new result encountered is STATUS_OBJECT_NOT_FOUND.
I am using Device Tree for finding right object .How can I find the right object?
Can I use the sysmbolic link? I am doubtfull about that.

Regards
Yuvraj Rege

NTSTATUS
WcdCreate(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
{

UNICODE_STRING FileName;

NTSTATUS ntStatus;
HANDLE FileHandle;
OBJECT_ATTRIBUTES ObjectAttributes;
WCHAR PathPrefix = L"\Device\Harddisk0\Partition2";
ULONG FileNameLength;
IO_STATUS_BLOCK IoStatus;
char *result;

UNREFERENCED_PARAMETER(DeviceObject);
Irp->IoStatus.Status = STATUS_SUCCESS;
file://ZwCreateFile stuff
RtlInitUnicodeString(&FileName, PathPrefix);
FileName.Length= FileName.Length - sizeof(WCHAR);

InitializeObjectAttributes ( &ObjectAttributes,
&FileName,
OBJ_CASE_INSENSITIVE,
NULL,
NULL );

ntStatus= ZwCreateFile(
&FileHandle,
FILE_READ_DATA | FILE_WRITE_DATA,
&ObjectAttributes,
&IoStatus,
NULL,
FILE_ATTRIBUTE_NORMAL,
0,
FILE_OPEN_IF,
FILE_NON_DIRECTORY_FILE,
NULL,
0
);

result=OsrNTStatusToString(ntStatus);

DbgPrint(“\n\n%s”,result);

ZwClose( FileHandle );

DbgPrint(“\n\nWCD : WCD_Create called”);
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
} // end WcdCreate()

---------------------------------
Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

I never said it couldn’t work with unformatted partitions. In fact it
will work just fine.

What i said was that the disk drivers may not have loaded for that disk
when you’re trying to open it. At what point during boot is your driver
trying to open the partition?

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of yuvraj rege
Sent: Tuesday, March 07, 2006 12:33 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] how to access the raw partition

Is this true that ZwCreateFile or ZwReadFile/ZwWriteFile works only for
the recognised/formatted partitions?
Can’t I use these functions with unformatted partitions?
Please tell me if there is any other way for accessing unformatted
partitions?
I want to use unformatted partition as a nonvolatile buffer for I/O
operations in my filter driver. Actually I want to avoid the overhead of
seek and latencies
causes due to fragmentation of partitions.Thats why I want to use
unformatted contiguous space in the harddisk.

How can I use the symbolic link for getting the named object of
unformatted partition so that I can use it in ZwCreateFile call?

Regards

Mrunal Rege

Peter Wieland wrote:

Yes you can use the symbolic link name.

When is your filter driver running this code? Are you doing
this during boot? If so there’s a strong chance that the disk drivers
won’t have been initialized yet in which case you can’t see the
partitions.

Can you step back a second and explain what your filter driver
is trying to do that you need to open a raw partition by name and write
to it? What are you filtering? What is it you’re trying to write to
the disk? There’s been a lot of focus on your use of UNICODE_STRING,
but i’m more curious about whether the goal you’re chasing is really
going to get you what you want.

-p



From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of yuvraj rege
Sent: Sunday, March 05, 2006 1:47 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] how to access the raw partition

Hello Sir ,
I have tried the pathname “\Device\Harddisk0\Partition2”
<file:> . Now the syntax problem is
solved because I have used
FileName.Length= FileName.Length - sizeof(WCHAR);
to ommit the NULL from my path.
But this time the new result encountered is
STATUS_OBJECT_NOT_FOUND.
I am using Device Tree for finding right object .How can I find
the right object?
Can I use the sysmbolic link? I am doubtfull about that.

Regards
Yuvraj Rege

NTSTATUS
WcdCreate(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
{

UNICODE_STRING FileName;

NTSTATUS ntStatus;
HANDLE FileHandle;
OBJECT_ATTRIBUTES ObjectAttributes;
WCHAR PathPrefix[] =
L"\Device\Harddisk0\Partition2";
ULONG FileNameLength;
IO_STATUS_BLOCK IoStatus;
char *result;

UNREFERENCED_PARAMETER(DeviceObject);
Irp->IoStatus.Status = STATUS_SUCCESS;
file://ZwCreateFile <file:></file:> stuff
RtlInitUnicodeString(&FileName, PathPrefix);
FileName.Length= FileName.Length - sizeof(WCHAR);

InitializeObjectAttributes ( &ObjectAttributes,
&FileName,
OBJ_CASE_INSENSITIVE,
NULL,
NULL );

ntStatus= ZwCreateFile(
&FileHandle,
FILE_READ_DATA | FILE_WRITE_DATA,
&ObjectAttributes,
&IoStatus,
NULL,
FILE_ATTRIBUTE_NORMAL,
0,
FILE_OPEN_IF,
FILE_NON_DIRECTORY_FILE,
NULL,
0
);

result=OsrNTStatusToString(ntStatus);

DbgPrint(“\n\n%s”,result);

ZwClose( FileHandle );

DbgPrint(“\n\nWCD : WCD_Create called”);
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
} // end WcdCreate()



Jiyo cricket on Yahoo! India cricket
http:cricket/>
Yahoo! Messenger Mobile
http:hoo.com/new/messenger/> Stay in touch with your buddies all the time.
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

________________________________

Jiyo cricket on Yahoo! India cricket
http:cricket/>
Yahoo! Messenger Mobile
http:hoo.com/new/messenger/> Stay in touch with your buddies all the time.
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</http:></http:></http:></http:></file:>

yuvraj rege wrote:

Is this true that ZwCreateFile or ZwReadFile/ZwWriteFile works only
for the recognised/formatted partitions?
Can’t I use these functions with unformatted partitions?
Please tell me if there is any other way for accessing unformatted
partitions?
I want to use unformatted partition as a nonvolatile buffer for I/O
operations in my filter driver. Actually I want to avoid the overhead
of seek and latencies
causes due to fragmentation of partitions.Thats why I want to use
unformatted contiguous space in the harddisk.

I’d like to explore this for a moment.

What leads you to believe that the “overhead of seek and latencies
causes due to fragmentation of partitions” are a problem for you? Have
you actually completed a design, discovered that it isn’t fast enough,
performed a profile analysis, and pinpointed disk latency as the issue?
Or are you jumping to a conclusion before you have tested the performance?

It would be much easier, for example, to pre-allocate space on an
existing partition, detect fragments in that space, and if the
fragmentation is too high, tell the user that he must defragment before
your driver can operate reliably. Or, if the drive is supposed to be
dedicated to your device, just force a quick reformat.

Years ago, I worked on a minicomputer project in which we used an
unformatted drive just as you propose. With the speed of today’s
high-end drives, I’m just very dubious that your cost/benefit ratio will
be reasonable.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.