2004/09/17 19:05:41+03:00 (none)!yura
- port ntfs_make_room_for_attr from mkntfs
- add new API: ntfs_not_resident_attr_record_add
- make ntfs_not_resident_attr_expand allocate new extent records
(warning: there is no rollback at present, old is obsolete, so I removed it.
I will write new rollback as soon as possible)
(Logical change 1.562)
- fix stupid bug with unmapped runlist in ntfs_attrlist_entry_add
- one stupid bug in ntfs_attrlist_entry_add: vcn is 64bit long
(Logical change 1.562)
I wrote several years ago. Note this is completely untested and there is
no error handling at all yet. I will be porting/adding the error handling
next. (Anton)
(Logical change 1.551)
ReadFile/WriteFile/SetPointer require aligned inputs (sector/memort wise)
A volume does not have to cover the entire partition.
While a volume is locked, its contents are not accessible via the disk handle.
(Logical change 1.522)
2004/08/31 16:12:21+01:00 cantab.net!aia21
- Change ntfs_attr_make_non_resident() to only allocate clusters and attempt
to write out data if the attribute size is not zero. (Anton)
- Fix ntfs_non_resident_attr_expand() to use ntfs_attr_map_whole_runlist()
instead of ntfs_attr_map_runlist(). (Anton)
(Logical change 1.519)
instead of partitions when possible, and use the windows volume
locking/dismounting mechanism on R/W open to prevent data corruption. (Yuval)
(Logical change 1.488)
na->data_size not from na->initialized_size
* revert code and comment update about highest in ntfs_non_resident_attr_{shrink,expand}, because
I fixed that bug
(Logical change 1.478)
fix starting lcn determination and set it to -1 if
there are no valid lcns in the attribute, i.e. let the
allocator choose in this case.
(Logical change 1.473)
end of a compression block because we were ending at minus one byte
which is effectively the same as being at the end. The fix is to
check whether the uncompressed buffer has been fully filled and if so
we assume we have reached the end of the compression block. A big
thank you to Marcin Gibuła for the bug report, the assistance in
tracking down the bug and testing the fix.
- Fix a bug where we forgot to reset the data_size and initialized_size
in two error code paths.
- Fix a bug where an uncompressed block could be misdetected as a
compressed one if it was made up of multiple runs.
(Logical change 1.390)
implementation of ntfs_external_attr_find() so it now returns the
attribute list attribute position at which the attribute should be
inserted in @ctx->al_entry (see descritpion for ntfs_attr_lookup() in
attrib.c for details).
(Logical change 1.343)
initialized mft records, not total mft records. This makes far more
sense and in fact reflects how nr_mft_records is being used in both
libntfs and the utilities.
(Logical change 1.326)
2004/03/09 14:38:49+00:00 cantab.net!aia21
Fix all occurences of printf with %ll length modifiers but 64 bit
arguments to typecast the arguments to (unsigned) long long to avoid
the warnings when compiling on 64 bit architectures.
(Logical change 1.306)
2004/02/20 14:44:47+00:00 cantab.net!aia21
Auto merged
2004/01/15 16:58:19+00:00 cantab.net!aia21
Auto merged
2004/01/07 15:48:41+00:00 cantab.net!aia21
Auto merged
2004/01/05 12:39:36+00:00 cantab.net!aia21
Auto merged
2003/12/05 18:09:00+00:00 cantab.net!aia21
Auto merged
2003/12/03 12:41:54+00:00 cantab.net!aia21
Auto merged
2003/11/04 13:06:21+00:00 cantab.net!aia21
Auto merged
2003/10/28 15:55:31+00:00 flatcap.org!ntfs
a few tweaks to help folding
(Logical change 1.299)
- all warnings fixed for maintainer mode for ntfsresize and ntfsclone
- added 'const' to ntfs_ucstombs()'s first parameter
- 'fsync' also after metadata-only cloning
- fixed forced metadata-only, dirty ntfs cloning (only one -f needed)
(Logical change 1.264)
the attribute list attribute. This is the same bug that was biting us in the
ntfs driver 2.1.4 and was fixed in 2.1.5. Windows XP creates files where an
attribute's data size is more than one run list run shorter than the allocated
size which causes us to crash out as we assumed this would never happen.
(Logical change 1.241)
the right flags get added for the right things and move all of this in one place in
configure.ac removing everything from the Makefile.am files.
(Logical change 1.239)
it is called for an attribute that cannot be non-resident.
Implement ntfs_attr_can_be_resident().
Start working on ntfs_attr_make_resident().
(Logical change 1.220)
2003/09/24 14:13:09+01:00 cantab.net!aia21
Fix a silly bug in attrib.c::ntfs_external_attr_find() which caused
us to always return the same attribute during an enumeration as soon
as the end of the attributes to be enumerated was reached thus
causing the program doing the enumeration to hang in a tight loop.
NOTE: There is still work to do as ctx->al_entry is set to NULL
instead of to the position in the attribute list at which to insert.
(Logical change 1.182)
2003/08/03 15:52:54+01:00 cantab.net!aia21
- Return ENOTDIR errno if inode is not a directory.
- Fix stupid bug where we attempt to close ia_na when it is null.
(Logical change 1.169)
opening / closing the device (in the default disk_io functions).
2003/06/03 10:35:17+01:00 cantab.net!aia21
Add Dirty bit setting/clearing.
(Logical change 1.139)
This is needed, otherwise ntfsimage outputs libntfs messages in debug
mode if stdout specified thus confusing e.g. compressing tools reading
from pipe. E.g. 'ntfsimage -o - device | bzip2 ...' creates a
corrupted, unusable ntfs image.
I've looked through libntfs and apparently no other places with this
problem.
Szaka
(Logical change 1.132)
- Check whether the attribute name needs moving when resizing the
resident part of an attribute record.
- Create internal function ntfs_attr_find_in_attrdef().
(Logical change 1.78)
- Rename ntfs_resident_attr_shrink() to ntfs_resident_attr_resize()
and make it resize upwards as well as downwards.
- Change ntfs_attr_truncate() to allow resizing upwards of resident
attributes.
(Logical change 1.75)
large change in the length of the attribute value.
- Only deallocate clusters, truncate the runlist, and regenerate the
mapping pairs array if the change in the non-resident attribute
value is sufficiently large.
(Logical change 1.67)
free the extent inode attached to the search context but leave it
attached to the base inode, so this would lead to memory corruption
and worse problems. Thanks to Szakacsits Szabolcs for spotting this.
We now don't close extent inodes any more at all and just leave it
to the closing of the base inode to dispose of all the extent inodes.
(Logical change 1.42)
Spotted and fixed by Szaka.
This one was particularly dumb as it has been fixed in the NTFS
kernel driver for over half a year but the fix was never propagated
into the library. )-:
(Logical change 1.39)
2002/07/08 23:27:16-00:00 !flatcap
added AT_NONAME so we can search for a (un)named attribute or just
iterate through all attributes
2002/07/08 06:23:22-00:00 !antona
Don't use string concatenation with __FUNCTION__ as gcc-3.x don't like it.
2002/07/05 21:15:31-00:00 !uid28698
- Enable enumeration of attributes using ntfs_lookup_attr() which is
requested by passing a type of AT_UNUSED (or simply zero) to
ntfs_lookup_attr(). (Based on initial patch by Szakacsits Szabolcs.)
- Fix two minor buglets in ntfs_find_external_attr() where we would
continue the search when we detect a mismatched type and/or name
instead of aborting and returning error EIO to flag the corruption.
2002/07/02 23:47:10-00:00 !antona
Global replacement of __[su]{8,16,32,64} with [su]{8,16,32,64} and layout.h define it.
2002/04/29 01:53:55-00:00 !antona
Loads of stuff. Improvements, start on attr pread and attr mst_pread. Write to follow. ntfslabel cleanup and extensions. libntfs cleanups, fixes, etc.
2002/04/28 21:59:11-00:00 !antona
Cleanup.
2002/04/28 21:20:27-00:00 !mattjf
ntfslabel - Coverted stoucs to ntfs_mbstoucs()
- code cleanup
- better error checking
unistr.c - removed size_t casts from ntfs_mbstoucs()
2002/04/18 17:20:05-00:00 !antona
New API function provided by unistr.[ch]: ntfs_mbstoucs()
2002/04/16 20:56:01-00:00 !antona
Add new API unistr.[ch]: ntfs_ucstombs() and make ntfslabel use it
2002/04/16 15:34:32-00:00 !antona
Fix the library...
2002/04/15 20:04:27-00:00 !antona
Fix all compiler warnings that came up with -Wall. Enabled -Wall for ./configure --enable-debug everywhere. Fix a few bugs in mkntfs that came up in the warnings (just error code paths, nothing major).
2002/04/14 14:08:30-00:00 !antona
Cleanup library code. Throw away unused stuff.
2001/06/09 16:31:13-00:00 !antona
mkntfs alpha release is here! Yey!
The only thing I am worried about is the fact that the system call to get the
number of sectors on the device returns a value rounded to the nearest 1024
bytes (converted to 512 byte blocks) thus we might be writting the backup boot
sector too early instead of on the real last sector but there is nothing I can
do apart from starting to play games like accessing the main device for hds
instead of the partition device which wouldn't help in the case of the last
partition though... Alternatively have to place the backup boot sector in the
middle of the disk like WinNT3.51 and earlier did but I need an image to see
exactly how they did it and even then we have the problem of not knowing where
the middle of the disk is as we don't really know how many sectors there are
for real with Linux kernel lying to us.
2001/06/09 00:25:55-00:00 !antona
mkntfs delayed. more reverse engineering required to determine exact method of
index entry collation. first few helper functions are already done and entered
into ntfslib in unistr.c
2001/06/01 02:07:26-00:00 !antona
It has been a long time since last commit. At moment have done a lot of work
on mkntfs but also at the moment ntfsfix and ntfsdump_logfile and libntfs are
broken. Basically only mkntfs works and that is not complete either.
2001/04/08 03:02:55-00:00 !antona
Added cvs Id header.
2001/04/02 02:04:37-00:00 !antona
Everything compiles again! Yey! (Don't know about working though, haven't tried
it... So be careful...)
The definitely final find_{first_}attr() functions are in place. Currently
still no support for attribute lists.
The two new _RE files contain the C-fied and more or less (more less than more
actually) cleaned up functions from the ntfs driver. Once they are cleaned
up (find_attr() is already completed but I left it in the _RE files for future
reference/educational value) and modified to suit my ideas of how they should
work, which are not quite the same as the driver way, they will make it into
attrib.[ch].
If anyone gives the new code a try, I would be interested in whether it worked
or not... (-;
2001/03/31 15:27:34-00:00 !antona
Added new name comparison function.
2001/03/07 01:17:33-00:00 !antona
Renamed the unicode files and introduced more code. Finished the new
find_first/next_attr() interface functions. Next on my list are functions
supporting attribute lists...
(Logical change 1.5)
2002/07/08 06:23:22-00:00 !antona
Don't use string concatenation with __FUNCTION__ as gcc-3.x don't like it.
2002/07/07 19:44:57-00:00 !antona
Change ntfs_read_file_record() not to abort if the inode is not in use. Adapt callers which care to check this themselves.
2002/07/02 23:47:10-00:00 !antona
Global replacement of __[su]{8,16,32,64} with [su]{8,16,32,64} and layout.h define it.
2002/06/08 14:12:01-00:00 !antona
ntfs_readdir() has arrived.
2002/06/05 20:32:53-00:00 !antona
Mft mirror now updated from ntfs_write_mft_record, yey! Fixup ntfstools accordingly.
2002/06/01 00:41:45-00:00 !antona
huge update!
2002/04/27 19:49:09-00:00 !antona
Update library, new APIs ntfs_attr_find_vcn(), misc fixes and cleanups, make all the utilities compile, fix bugs I noticed in ntfslabel and it now works properly.
2002/04/24 23:47:42-00:00 !antona
Hammer out the API for run list merging. Add calls for low level (using raw run lists and ATTR_RECORDs as parameters) run list merging, mappaing pairs decompression, and vcn to lcn conversion as well as high level (using ntfs_attr as parameter) calls for run list mapping and vcn to lcn conversion.
2002/04/22 10:34:31-00:00 !antona
Attribute list support (merging done, part 2, some stuff still incomplete). mkntfs ntfs volume creation. See the changelog...
2002/04/20 23:09:42-00:00 !antona
Port attribute lookup functions with attribute list support from ntfs tng driver. Port/reimplement extent mft record handling code as well. Rename out all dollar signs from type names and constants. Adapt all callers to new API. Note mkntfs is currently broken due to some needed work.
2002/04/20 01:53:02-00:00 !antona
Rename mft code adding ntfs_ prefix. Change all return values to zero on success. Thanks to mattjf for pointing out the inconsistencies.
2002/04/16 12:13:53-00:00 !antona
New API function mft.[ch]::read_file_record(). Also some cleanups.
2002/04/15 20:04:27-00:00 !antona
Fix all compiler warnings that came up with -Wall. Enabled -Wall for ./configure --enable-debug everywhere. Fix a few bugs in mkntfs that came up in the warnings (just error code paths, nothing major).
2002/04/15 19:02:40-00:00 !antona
Really fix the library and mkntfs while at it.
2002/04/15 18:54:07-00:00 !antona
Update library for the new API.
2002/04/15 18:39:37-00:00 !antona
Cleanup some mistakes.
2002/04/15 17:51:26-00:00 !antona
read/write_mft_record(s) are here
2002/04/15 00:42:07-00:00 !antona
Big rewrite of disk_io.c. Now should have stable API for low level disk access. Move all mft record related stuff from disk_io.c to mft.c.
2002/04/14 14:08:30-00:00 !antona
Cleanup library code. Throw away unused stuff.
2002/04/14 13:34:49-00:00 !antona
Throw away all unnecessary crap.
2001/12/15 05:13:08-00:00 !antona
Remove atomic ops and add compiler version check.
2001/06/01 02:07:26-00:00 !antona
It has been a long time since last commit. At moment have done a lot of work
on mkntfs but also at the moment ntfsfix and ntfsdump_logfile and libntfs are
broken. Basically only mkntfs works and that is not complete either.
2001/04/11 14:29:12-00:00 !antona
Almost fixed compilaton. Remember to declare a struct type with
struct NAME { declaration }; rather than the bogus struct { declaration NAME };
then can use typedef NAME othername; on a forward declaration of NAME
(struct NAME;) and all is fine...
2001/04/11 11:49:16-00:00 !antona
Header file reorganisation so that it compiles.
2001/04/10 23:37:19-00:00 !antona
Ok, ntfsd was a mistake for userspace. It increases complexity no end while
not giving us much functionality. Lets get it working and then worry about the
kernel. - As it was the idea originally anyway, so this is just a return on the
right track. (-8
We keep the timer and signal handler but the only thing we do is to set a bool
flag (ntfs_need_sync) and we will just check this in appropriate places and
if it is true we call ntfs_sync_volumes() which sets it back to false. This
means no more locking at all of any description and no need to worry about the
signal handler interrupting things in bad ways and/or at bad times in the main
code.
2001/04/09 00:05:37-00:00 !antona
More or less finished file handling. (Probably some useful functions are
still missing but they will be implemented as need arises.)
One thing that is stupid at the moment is we don't limit the amount of
cached mft_records so if you were to load loads the machine would eventually
run out of memory... Can't happen with files as they are limited to 1000,
unless you are short of memory. (Hard limit at the moment, set in ntfs_mount().
Maybe ntfsd should be monitoring memory usage and be throwing out unused cache
entries and closed_files? That would mean to have locking everywhere, though.)
Still missing: - Convert old code to use new stuff. - Add non-resident
attributes somewhere. Either into the mft_entry structure or into the
ntfs_file structure, but which? At the moment I tend to mft_entry so they can
be synced together with the entries by ntfsd.
2001/04/08 01:58:29-00:00 !antona
User space conversion of locking complete. I settled for using simple spinlocks
and atomic variables and instead of deadlocking/livelocking when using
spin_lock(), use spin_trylock() in a while letting go of the cpu between each
call and making a maximum of 100 iterations (or we return EDEADLK error code).
This is not the most efficient way, especially as can't have multiple readers
but it is the simplest way to go about things.
Should now have (almost) all required helper functions for dealing with mft
entries implemented.
Now need the file handling and then convert the whole project to use the new
code and then can finally get back to work on attribute searching...
2001/04/05 20:14:45-00:00 !antona
Commit of current state of development including locking a la kernel.
This doesn't work on user space (semaphores don't work).
Just want to have it committed. Will take out locking / modify it where
necessary to use pthreads ASAP.
2001/04/03 23:38:34-00:00 !antona
Mark mft entry dirty function complete
2001/03/05 03:04:40-00:00 !antona
Corresponding changes to the library.
2001/01/25 22:25:43-00:00 !antona
More files added to ntfs lib. Fixed some consistency problems.
(Logical change 1.5)
2002/07/08 06:23:22-00:00 !antona
Don't use string concatenation with __FUNCTION__ as gcc-3.x don't like it.
2002/07/02 23:47:10-00:00 !antona
Global replacement of __[su]{8,16,32,64} with [su]{8,16,32,64} and layout.h define it.
2002/06/05 20:32:53-00:00 !antona
Mft mirror now updated from ntfs_write_mft_record, yey! Fixup ntfstools accordingly.
2002/06/05 00:29:19-00:00 !antona
Make ntfs_attr_pread work with resident attributes and start on ntfs_attr_pwrite (incomplete!).
2002/06/04 12:12:42-00:00 !antona
Final POSIXification of disk_io functions. (famous last words)
2002/06/01 00:41:45-00:00 !antona
huge update!
2002/04/29 01:53:55-00:00 !antona
Loads of stuff. Improvements, start on attr pread and attr mst_pread. Write to follow. ntfslabel cleanup and extensions. libntfs cleanups, fixes, etc.
2002/04/18 18:15:46-00:00 !antona
Define API for bootsect.[ch]: is_boot_sector_ntfs().
2002/04/16 15:34:32-00:00 !antona
Fix the library...
2002/04/15 20:04:27-00:00 !antona
Fix all compiler warnings that came up with -Wall. Enabled -Wall for ./configure --enable-debug everywhere. Fix a few bugs in mkntfs that came up in the warnings (just error code paths, nothing major).
2002/04/15 18:39:37-00:00 !antona
Cleanup some mistakes.
2002/04/15 17:51:26-00:00 !antona
read/write_mft_record(s) are here
2002/04/15 00:42:07-00:00 !antona
Big rewrite of disk_io.c. Now should have stable API for low level disk access. Move all mft record related stuff from disk_io.c to mft.c.
2002/04/14 15:26:23-00:00 !antona
Remove find_first_attr and make all users use get_attr_search_ctx + find_attr instead.
2002/04/14 14:08:30-00:00 !antona
Cleanup library code. Throw away unused stuff.
2001/06/01 02:07:26-00:00 !antona
It has been a long time since last commit. At moment have done a lot of work
on mkntfs but also at the moment ntfsfix and ntfsdump_logfile and libntfs are
broken. Basically only mkntfs works and that is not complete either.
2001/04/11 15:29:39-00:00 !flatcap
minor build fixes
2001/04/11 14:29:12-00:00 !antona
Almost fixed compilaton. Remember to declare a struct type with
struct NAME { declaration }; rather than the bogus struct { declaration NAME };
then can use typedef NAME othername; on a forward declaration of NAME
(struct NAME;) and all is fine...
2001/04/11 11:49:16-00:00 !antona
Header file reorganisation so that it compiles.
2001/04/08 03:02:55-00:00 !antona
Added cvs Id header.
2001/04/05 20:14:45-00:00 !antona
Commit of current state of development including locking a la kernel.
This doesn't work on user space (semaphores don't work).
Just want to have it committed. Will take out locking / modify it where
necessary to use pthreads ASAP.
2001/04/03 22:42:42-00:00 !antona
See last commit message.
2001/04/02 02:04:37-00:00 !antona
Everything compiles again! Yey! (Don't know about working though, haven't tried
it... So be careful...)
The definitely final find_{first_}attr() functions are in place. Currently
still no support for attribute lists.
The two new _RE files contain the C-fied and more or less (more less than more
actually) cleaned up functions from the ntfs driver. Once they are cleaned
up (find_attr() is already completed but I left it in the _RE files for future
reference/educational value) and modified to suit my ideas of how they should
work, which are not quite the same as the driver way, they will make it into
attrib.[ch].
If anyone gives the new code a try, I would be interested in whether it worked
or not... (-;
2001/03/26 04:34:20-00:00 !antona
typo fix
2001/03/26 04:28:07-00:00 !antona
Cleanup and fixes.
2001/03/26 03:39:59-00:00 !antona
Updates
2001/03/05 03:04:40-00:00 !antona
Corresponding changes to the library.
2001/03/02 15:05:53-00:00 !antona
Commit latest library state. !!!NOTE!!! This breaks everything!!! I'm in the
middle of rewritting the find_attribute stuff in attrib.c at the moment.
2001/01/26 00:34:10-00:00 !antona
Added disk io functions file.
(Logical change 1.5)
2002/07/02 23:47:10-00:00 !antona
Global replacement of __[su]{8,16,32,64} with [su]{8,16,32,64} and layout.h define it.
2002/06/30 17:02:41-00:00 !flatcap
typos
2002/04/18 18:15:46-00:00 !antona
Define API for bootsect.[ch]: is_boot_sector_ntfs().
2002/04/14 14:08:30-00:00 !antona
Cleanup library code. Throw away unused stuff.
2002/04/14 13:28:19-00:00 !antona
Cleanup mst fixup handling bringing it inline with kernel driver and rename the file to mst rather than ntfs_rec.
(Logical change 1.5)
2002/07/02 23:47:10-00:00 !antona
Global replacement of __[su]{8,16,32,64} with [su]{8,16,32,64} and layout.h define it.
2002/06/06 20:47:33-00:00 !antona
The beginning of the directory operations! Introduce dir.[hc] and ntfs_lookup_inode_by_name().
2002/06/02 23:02:20-00:00 !antona
More fixes and updates.
2002/04/24 01:37:37-00:00 !antona
New api call is_boot_sector_ntfs. A few folding help cleanups.
2002/04/21 01:26:39-00:00 !antona
Cleanup/streamline include file dependencies.
2002/04/20 23:09:42-00:00 !antona
Port attribute lookup functions with attribute list support from ntfs tng driver. Port/reimplement extent mft record handling code as well. Rename out all dollar signs from type names and constants. Adapt all callers to new API. Note mkntfs is currently broken due to some needed work.
2002/04/18 18:15:46-00:00 !antona
Define API for bootsect.[ch]: is_boot_sector_ntfs().
2001/06/01 02:07:26-00:00 !antona
It has been a long time since last commit. At moment have done a lot of work
on mkntfs but also at the moment ntfsfix and ntfsdump_logfile and libntfs are
broken. Basically only mkntfs works and that is not complete either.
2001/04/08 03:02:55-00:00 !antona
Added cvs Id header.
2001/03/05 03:04:40-00:00 !antona
Corresponding changes to the library.
2001/01/30 12:29:03-00:00 !antona
And the last move into CVS. The make files. (Note: compilation is untested
and all changes have been done without testing so if it doesn't compile at
the moment don't be too surprised.)
2001/01/25 22:25:43-00:00 !antona
More files added to ntfs lib. Fixed some consistency problems.
(Logical change 1.5)