bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linux-NTFS-Dev] NTFS resizer


From: Andrew Clausen
Subject: Re: [Linux-NTFS-Dev] NTFS resizer
Date: Wed, 8 Aug 2001 20:30:47 +1000
User-agent: Mutt/1.2.5i

On Wed, Aug 08, 2001 at 12:42:42AM +0100, Anton Altaparmakov wrote:
> libntfs is in no way prepared to do any of this at this point. Just thought 
> you should know... In particular there is _no_ support for extension mft 
> records.

Hmmm.  Looking at the code.... I think things should be more file and
attribute centric, rather than mft-record centric.

For example, things like:

ntfs_file* ntfs_file_get (ntfs_volume* vol, const MFT_REF mref);
attr* ntfs_file_add_attr (ntfs_file* file, ATTR_TYPES type)
BOOL ntfs_file_del_attr (ntfs_file* file, attr* attr);
attr* ntfs_file_get_attr (ntfs_file* file, ATTR_TYPES type);
BOOL ntfs_file_sync (ntfs_file* file);

BOOL ntfs_attr_can_set_resident (attr* attr);
BOOL ntfs_attr_set_resident (attr* attr, BOOL resident);
LCN ntfs_attr_get_cluster (attr* attr, VCN vcn);
inline BOOL ntfs_attr_set_cluster (attr* attr, VCN vcn, LCN lcn) {
        return ntfs_attr_set_run (attr, vcn, 1, lcn);
}
BOOL ntfs_attr_set_run (attr* attr, VCN vcn, VCN count, LCN lcn);

BOOL ntfs_attr_read (attr* attr, _u64 offset, _u64 count, _u8* buf);
BOOL ntfs_attr_write (attr* attr, _u64 offset, _u64 count, const _u8* buf);
inline BOOL ntfs_attr_trunc (attr* attr, _u64 offset, _u64 count) {
        return ntfs_attr_set_run (attr, offset, count, NTFS_LCN_SPARSE);
}

A convienient way for traversing attributes would be nice.
Perhaps make attribute a linked list, with the head in ntfs_file?
(When you do ntfs_file_get(), you read in the important bits of the
attributes - basically, everything resident in the MFT...)

Is this all sane?  I'm still really new to all this ;)

Thanks,
Andrew




reply via email to

[Prev in Thread] Current Thread [Next in Thread]