Commit Graph

248 Commits (2b1ef811e6f99659c2b180e9be8f8ef2fef086a1)

Author SHA1 Message Date
Yura Pakhuchiy 673c23d74a libntfs: Cache opened attributes. 2007-09-20 15:35:43 +03:00
Yura Pakhuchiy bf3a7442eb ntfs_attr_pwrite: Write 4096 bytes blocks when possible. (David Fox, Szaka, Anton, Yura) 2007-09-15 23:09:20 +03:00
Yura Pakhuchiy 54d7899368 Workaround windows defragmentation tool bug.
Windows defragmentation tool do not update name offset correctly for unnamed
attributes, but chkdsk do not like when it negative, so do not change it at all
if it would become negative.  (Szaka)
2007-09-07 15:50:29 +03:00
Yura Pakhuchiy 82df6c1fea Rework time updates
- Library no longer perform time updates, only provide API for this
- Remove ntfs_inode_update_{a,}time() and introduce ntfs_inode_update_times()
- Make ntfsmount properly update times
- ntfs_delete() now takes pointer to pointer to ntfs_inode for while to delete and closes inode only in cases no more hard links left to file
2007-09-06 18:34:38 +03:00
Yura Pakhuchiy 4679daa0af Fix hole instantiating and new API ntfs_rl_fill_zero
Thanks to Szaka for finding this bug and idea of factoring out zero filling code.
2007-09-05 16:38:51 +03:00
Yura Pakhuchiy 219d353226 Fix corner case in hole instantiating in ntfs_attr_pwrite(). (Szaka) 2007-09-04 17:20:13 +03:00
Yura Pakhuchiy 95b044cff3 Small enchantments and cleanups from ntfs-3g 2007-09-03 19:51:13 +03:00
Yura Pakhuchiy 3b64a5a512 trailing spaces 2007-09-03 19:39:24 +03:00
Yura Pakhuchiy ad0c5f59c9 Transparently integrate reading of encrypted files into library
This adds crypto.[ch], several exported functions that you are not interested
to use and dependency on >=libconfig-1.0.1 to read list of PFX files with keys.
See libntfs/config for example configuration file.
2007-08-22 16:55:57 +03:00
Yura Pakhuchiy 0d264b7d25 Introduce sparse endian annotations. Adopt library (also fix 2 real bugs) and progs (lots of bugs). 2007-06-08 13:47:57 +03:00
Yura Pakhuchiy 48c336fd6a O(1) mapping pairs update for normal files 2007-06-08 13:45:28 +03:00
Yura Pakhuchiy b99d331f78 We do not need to map whole runlist in this case, only until @pos. Introduce ntfs_attr_map_runlist_range to implement this. 2007-06-08 13:41:10 +03:00
Yura Pakhuchiy e6620be16d Do not create holes in ntfs_attr_pwrite that will be instantiated right after creation
* Add new API: __ntfs_attr_truncate that allow user to select whether holes should be created or clusters allocated
* Update ntfs_attr_pwrite and ntfscp to use it.
2007-06-08 13:35:47 +03:00
yura 48399b98b3 cleanup 2007-03-13 18:45:51 +00:00
yura 18c8f75c7b make ntfs_attr_rm to always close attribute (both on success and failure) 2006-11-22 18:28:13 +00:00
yura 28f24fbc2c revert factoring out ntfs_attr_fill_hole(), agree that it should be refactored,
but passing all args as pointers and changing them there (especially
update_from that changes only inside new function, but rollback depends on it
in pwrite)
2006-11-10 16:07:45 +00:00
yura f2e1ff96d2 Spent really a lot of time applying various "optimizations" from ntfs-3g and
finally figured out that ntfs-3g is faster than ntfsmount only because of
3 reasons:
1) turned on noatime option by default
2) ntfs-3g builds without debug output by default
3) the only real optimization: almost always add resident attributes.
However by accident patch in ntfs-3g for 3) breaks several code paths (why
I am not surprised?), thus I rewrote whole ntfs_attr_add() logic.
2006-11-09 21:19:11 +00:00
aia21 025f07a269 Make a little nicer. 2006-11-07 10:37:25 +00:00
uvman be6b5ce977 Factor ntfs_attr_fill_hole() out of ntfs_attr_pwrite(). (Szaka) 2006-11-01 20:20:18 +00:00
uvman 7d585a0327 Change callers of malloc() to ntfs_malloc() (Szaka). Fix compilition (Yuval). 2006-11-01 13:30:40 +00:00
uvman 8fd26af3fb Fix memleak. Remove dead code. 2006-10-28 23:08:24 +00:00
uvman 08db1a719b Aid basic static code checkers to see that ctx can not be null in this code path. 2006-10-28 23:06:49 +00:00
yura ab3519cbcd Always instantiate holes 2006-10-27 14:18:02 +00:00
uvman ff55ecb513 Whitespace cleanup 2006-10-27 12:24:29 +00:00
uvman bd1837335b trace output updates. (Szaka, Yuval) 2006-10-26 20:45:28 +00:00
uvman ca2fb9a467 Remove inline keywords from static non-one-liners of '.c' files. 2006-10-26 19:10:05 +00:00
uvman fc7553ad2b [Inconstant,Damaged] metadata -> Inconsistent metadata 2006-10-25 18:57:15 +00:00
uvman 480fdb14d5 One more errno save/restore. 2006-10-22 01:11:48 +00:00
uvman 7b6f7e98d4 Remove saving and restoring errno around logging calls as these will not change errno anyway. Remove save/restore only if the saved value will not be used. 2006-10-22 00:23:29 +00:00
yura d15ed62ae4 a bit of cleanups 2006-08-14 03:52:56 +00:00
yura a00ee02388 had not noticed lack of externs :( 2006-08-03 04:30:41 +00:00
yura 70aef8d69c Prevent index root to be moved out from base mft record 2006-08-02 03:57:40 +00:00
yura 9d0f9aec4c Add new API ntfs_attr_exist() that checks whether attribute with selected type and name already present in inode. (Szaka) 2006-08-02 03:12:34 +00:00
yura 47a2ca1154 80 chars per line cleanup 2006-08-02 01:33:54 +00:00
aia21 0873318cbb Yura uses ntfs_attr_lookup() in a way it never was anticipated to work so my
fix broke his way of working.  This is a middle ground where both should work.
This still leaves a bug in collation of attribute list entries though which
needs to be investigated and fixed...
2006-07-27 08:38:17 +00:00
aia21 179966fb0c Fix long standing stupendously stupid bug in libntfs/attrib.c::
ntfs_external_attr_find() and also port a bugfix from the advanced
ntfs kernel driver to the same function.  (Anton)
2006-07-23 21:43:08 +00:00
szaka 9b801db7c8 libntfs: add ntfs_attr_readall() which reads the entire data from an attribute 2006-03-27 20:01:36 +00:00
cha0smaster f424e61b96 Fix bug in ntfs_attr_pwrite() when we sometimes lose current run in the runlist. 2006-03-04 13:56:34 +00:00
cha0smaster 01309e4ec9 formatting 2006-03-04 00:06:49 +00:00
antona 49fd93718c Cope with attribute list attribute having invalid flags. Windows
copes with this and even chkdsk does not detect or fix this so we
have to cope with it, too.  Thanks to a Pawel for reporting the
problem.  (Anton)
2006-02-24 09:20:10 +00:00
cha0smaster 6497828e53 While fixing allocated/compressed size I lost correct data size value by accident. 2006-02-21 18:57:34 +00:00
cha0smaster 241c7585a6 Fix runlist setting and incorrect file sizes in the index. 2006-02-21 04:40:20 +00:00
cha0smaster 559d28d2ee cleanup 2006-02-21 03:40:24 +00:00
cha0smaster 9bcf003f26 ntfs_attr_pwrite: Fix very serious bug, when sometimes not whole mapped runlist was passsed to ntfs_attr_update_mapping_pairs. 2006-02-20 00:48:35 +00:00
cha0smaster 2fa889ff26 cleanups 2006-02-19 00:37:15 +00:00
cha0smaster 6ba0e1d1e0 fix bug with sparse attribute shinking when runlist is not changed. (already fixed such for expanding, do not know why I forgot to update shrinking) 2006-02-19 00:36:23 +00:00
cha0smaster dc751c641b cleanup 2006-02-10 11:00:47 +00:00
szaka b5f4182861 Add some important debugging, tracing info 2006-02-09 21:40:00 +00:00
cha0smaster eba747ac93 * Add NTFS_DEV_LIST define. Use it everywhere instead of linux-ntfs-dev@lists.sf.net.
* Replace all ntfs_log_trace where we ask to send mail to us with ntfs_log_error
2005-12-18 16:27:20 +00:00
flatcap 04ebd8256d The addition of one hundred and forty-five linefeeds. Thanks Yura! 2005-12-04 22:42:51 +00:00