1a710ff698178fbf71251395c4c96e3e7e73e2ed |
|
10-Jul-2015 |
Thierry Strudel <tstrudel@google.com> |
fs_config: align with new explicit fs_config target_out parameter Bug: 21989305 Bug: 22048934 Change-Id: I5b49d521562245cae00fa9701c92dc0a1fa3dd80 Signed-off-by: Thierry Strudel <tstrudel@google.com>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
18fe5f67e87711ceb72ca0fb2282f32c4533f061 |
|
03-Mar-2015 |
Mohamad Ayyash <mkayyash@google.com> |
squashfs-tools: Add mount-point flag This flag is necessary when android-fs-config or context-file are passed and the source directory is not mount point (e.g. absolute path, current dir '.', different dir name than mount point...etc). Change-Id: I3b4bdc401527765a571ff4e5fb5815c6d5e85adc Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e031629d3e772df1a768a4998f61e5131b9110ac |
|
25-Feb-2015 |
Mohamad Ayyash <mkayyash@google.com> |
squashfs-tools: Allow setting selinux xattrs through file_context Add a context-file flag that allows passing an selinux security context file to set security.selinux xattrs rather than reading xattrs from filesystem's source directory. Change-Id: Icad4d38a736137d85835a0eab9650c0c99908721 Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
829ffbec404afe0278f9f34486772513ed0c36dc |
|
24-Feb-2015 |
Mohamad Ayyash <mkayyash@google.com> |
squashfs-tools: Add android fs-config flag. Android specific flag to set inodes' mode, uid, and gid according to android_filesystem_config rather than reading them from the source filesystem. Change-Id: I11c54158c53c5aaaebb0d8db0409201548207d44 Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1eda7b88329333e6c3eccce26982dc7058bc9392 |
|
13-Sep-2014 |
Guan, Xin <guanx.bac@gmail.com> |
Fix 2GB-limit of the is_fragment(...) function. Applies to squashfs-tools 4.3. Reported-by: Bruno Wolff III <bruno@wolff.to> Signed-off-by: Guan, Xin <guanx.bac@gmail.com> Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1ec844d88336cd5a1cd30e247669f3f495601a2e |
|
18-Sep-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix rare race in fragment waiting in filesystem finalisation Fix a rare race condition in fragment waiting when finalising the filesystem. This is a race condition that was initially fixed in 2009, but inadvertantly re-introduced in the latest release when the code was rewritten. Background: When finalising the filesystem, the main control thread needs to ensure all the in-flight fragments have been queued to the writer thread before asking the writer thread to finish, and then writing the metadata. It does this by waiting on the fragments_outstanding counter. Once this counter reaches 0, it synchronises with the writer thread, waiting until the writer thread reports no outstanding data to be written. However, the main thread can race with the fragment deflator thread(s) because the fragment deflator thread(s) decrement the fragments_outstanding counter and release the mutex before queueing the compressed fragment to the writer thread, i.e. the offending code is: fragments_outstanding --; pthread_mutex_unlock(&fragment_mutex); queue_put(to_writer, write_buffer); In extremely rare circumstances, the main thread may see the fragments_outstanding counter is zero before the fragment deflator sends the fragment buffer to the writer thread, and synchronise with the writer thread, and finalise before the fragment has been written. The fix is to ensure the fragment is queued to the writer thread before releasing the mutex. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9963944c74a30ce3ed7daee0a623adf7eb8bece2 |
|
13-Sep-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix progressbar for sort files The progressbar was incorrectly enabled *after* writing files if sort files were used. This meant the progressbar would not be updated whilst files were being written to the filesystem. As this is the bulk of the work for Mksquashfs, this means the progressbar basically didn't appear to update whilst Mksquashfs was running, and then suddenly updated to 100% at the end of Mksquashfs. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4d5b331b2004dfe31c70fe75ea01802f632a6517 |
|
11-Sep-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
action: change expression logging to use atom->args Previously it used atom->test->args which is the arg count in the "generic" test function. Now that test function parsing has been improved to add variable arguments, we should be using the new atom->args field which is the number of actual arguments in the particular parsed test - i.e. the instance rather than the definition. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9145bf97a0dc0b053805686efec7e0f6034c827c |
|
08-Sep-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
action: add octal mode support to perm test function Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fe8ec3abcdfebbfe922ca1e47c2e70c45cc981ae |
|
06-Sep-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: implement perm() test function Implement perm() test function, this is modelled directly on find -perm and implements its behaviour. Following find, three types of match are supported: perm(mode) - exact match perm(-mode) - all of the permission bits are set for the file perm(/mode) - any of the permission bits are set for the file With perm(/mode) if no permission bits are set in mode match on any file, this is to be consistent with find, which does this to be consistent with the behaviour of -perm -000 Note, only symbolic modes are currently implemented. Octal modes will be implemented next. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4be6d450246def726fb482674ea6c1c6a47f7808 |
|
03-Sep-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix cmdline arg free if >1 source dir and one of them is excluded If you specify multiple sources (directories and/or files) on the command line, Mksquashfs will merge those sources into a root directory containing all of them. This is different to the behaviour when a single directory is specified, in which case Mksquashfs creates a filesystem with the root containing the contents of the source directory. The difference manifests itself in the way the pathname of each of the directory entries is stored/obtained. Normally to reduce runtime overhead when the directory entries have all come from the same parent directory, the source pathname is not stored in each directory entry, but is computed from the source pathname of the parent directory. But in the case of the "dummy" root created to merge multiple sources specified on the command line, each directory entry does not share the same parent pathname, and so the source pathname of each directory entry is stored in the nonstandard_pathname field. This nonstandard_pathname was originally filled in using a pointer to the source pathname on the command line. Now, if you later exclude one of these source directories, Mksquashfs will free the storage, and it will try and free the nonstandard_pathname field, which leads to a crash as you cannot free a command line argument. The fix to this is to strdup the command line source and store the copy in the directory entry. This is not considered a serious bug, it has not been reported, and the scenario was discovered by chance whilst looking at the code. Additionally the trigger scenario is highly artificial and there is no use-case where this bug will be triggered. To trigger it you need to specifiy multiple source command arguments, and then you need to exclude one of them. But, if you explicitly specified it on the command line why would you later exclude it, and if you did want to exclude it the obvious way would be to remove it from the command line. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ae6a655a33d9a6e1c4a0b88b11a26c6cfed7bbdb |
|
31-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: fix symbolic mode parsing in the mode() action When I implemented symbolic modes in the mode() action (i.e. u+r-w) I made an oversight. I didn't realise the specification allowed multiple =-+ sequences after the ownership specification. In otherwords if you wanted to add r (+r) and remove w (-w) from user, I assumed you would do u+r,u-w. After revisiting the symbolic mode specification it turns out you should be able to do u+r-w as a short cut to the previous specification. It also should be obvious I don't tend to use the symbolic mode but directly use the octal specification! So fix the parser to allow multiple =-+ sequences. So the syntax of the symbolic mode support goes from [ugoa]+[+-=]PERMS PERMS = [rwxXst]+ or [ugo] to [ugoa]*[[+-=]PERMS]+ PERMS = [rwxXst]+ or [ugo] Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
35a00ded63fb3a75dc58b5d63454d0a5134b0cdc |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add -false-action-file option Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b670481b0576702ab0151282087170db27388bb1 |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix usage of "_" in new options Gah, I like using "_" as the separator between words in options. But, a long time ago I noticed I'd ended up with "-" as the separator in the majority case, and so I'm stuck with "-" as the separator. Fix verbose_option, true_option, false_option, action_file and verbse_action_file. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3ead06b187f5b4b29bf76b9248befae899a50e96 |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add -true-action-file option Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a5541d86600e1f490d6a073b020ac3b12cf8c058 |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add -true_action_file option Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b7c5da70905001ecd116e3915df8c744509a44fc |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix read_action_file to use ACTION_LOG_{NONE|VERBOSE} Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
dfddb9b4eaead6077b9f772601ff68885f0e11d9 |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add -verbose_action_file as synonym for -vaf Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
bd4322689de7fcf6aadf96a878051c5ac631c18f |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add -action_file as synonym for -af Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fcfaf0a140e1af58428fc5079fb7abd8c4803573 |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add -false_action option Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
33e5d112381c981451e57d713fc1dcf900b64be0 |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add -true_action option Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a2289828e0ff6eae4ccf2fa1599ed347fdad1891 |
|
27-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
action: update action option parsing to use ACTION_LOG_{NONE|VERBOSE} Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
089a81ad7c1fcd8cd7c5e55b16538acfd7c34ead |
|
24-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: implement -vaf (verbose action file) option Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b477525d9a4cc6d85a78af89ac5afb1013cb2280 |
|
24-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: implement verbose_action for stat_fn test operator Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
28d3a3499d316c86f6797f4f8876df00ce9d9613 |
|
23-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: implement verbose_action for readlink_fn test operator Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
16bffa0c5147dbd907b57599d37ecf7430ae2a85 |
|
22-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: implement verbose_action for eval_fn test operator Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
06052c6433939bbfa8271018dd52dbf22f34bc2f |
|
18-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: implement -verbose_action option Add an action option that prints the result of evaluating the associated expression, annotating the result of evaluating each atom (test operation) with =True or =False. This can be used (especially in debugging action statements) to show which action statements triggered, and why, and which action statements didn't trigger and again why. For instance given the action -verbose_action 'uid(root)@type(d)||name(file*)' This could produce the following output test2/empty=uid(root)@(type(d)=True) test2/file9=uid(root)@(type(d)=False||name(file*)=True) test2/file4=uid(root)@(type(d)=False||name(file*)=True) test2/a=uid(root)@(type(d)=False||name(file*)=False) test2/sym=uid(root)@(type(d)=False||name(file*)=False) test2/dir=uid(root)@(type(d)=True) test2/dir/fred=uid(root)@(type(d)=False||name(file*)=False) test2/file8=uid(root)@(type(d)=False||name(file*)=True) test2=uid(root)@(type(d)=True) Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c5a362ad1ed7f4f74227dc9f0ca3895ba04eaafd |
|
11-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
action: add eval() test operation Follow path (arg1) and evaluate the expression (arg2) in the context of the file discovered. All attributes are updated to refer to the file that is pointed to. This test operation allows you to add additional context to the evaluation of the file being scanned, such as "if current file is XXX and the parent is YYY, then ..." Often times you need or want to test a combination of file status If the file referenced by the path does not exist in the output filesystem, or some other failure is experienced in walking the path (see follow_path above), then FALSE is returned. If you wish to evaluate the inode attributes of files which exist in the source filestem (but not in the output filesystem then use stat instead (see above). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
22d67dabb1232e9961325c22bc604b97a733fc15 |
|
08-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs/actions: make the root of the in-core directory structure available to various action test operations. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
97b7c4b9b783f62bc4d04750c9b090ac03a24fbb |
|
04-Aug-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix dir_scan5() -- empty prune action Dir_scan5() did not check for root entries (entries in the root directory read from the original filesystem in append mode). These entries are not "real" entries in that they cannot be evaluated for emptiness. The entries only exist in the original filesystem amd must be skipped. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
7312f99cd7e1dee6a4c9e879a031ad371e78b04b |
|
31-Jul-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
action: implement readlink test operation Dereference the symlink and evaluate the expression in the context of the file pointed to by the symlink. All attributes are updated to refer to the file that is pointed to. Thus the inode attributes, pathname, name and depth all refer to the dereferenced file, and not the symlink Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
eae5a18ec666032eead0396f86c22a3aa09c2269 |
|
30-Jul-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: get rid of contained and contained_followlink They are now subsumed in the rewritten exists function. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
49bf860539874183ada21bd2565e254374019107 |
|
29-Jul-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move creation of root directory dir_ent and inode structure Move it to just after dir_scan1(). Future action test operations may reference this in their operation, and so it needs to be present when these test operations are evaluated. Previously these structures were not referenced by code until after dir_scan6() which is why they were created then. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e19ce45ed7ae61bf318bb967a7076c8193e771d7 |
|
27-Jul-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move symlink reading from create_inode() to dir_scan1() Up till now Mksquashfs did not read the contents of symlinks at directory scanning, but left this task to the final filesystem creation when the symlink inode in the output squashfs filesystem was created. Now that we're adding action test operations that operate on symlinks, this creates a problem. We want the values of the symlink when evaluating the symlink for existence, recursive evaluation via readlink() etc. Up till now when implementing these tests I have chosen to read the symlink from the source filesystem on demand and then discard the value. The over-arching reason for this is because symlinks can reference other symlinks, and because these tests were previously designed to be evaluated at exclude action time when the directory structure has not been fully scanned, we need to deal with symlinks that have not yet been scanned. In other words moving symlimk reading to directory scan time is no help when evaluating synlinks at exclude time because there is no guarantee that any referenced symlinks have been read. You have no option but to fall back to reading symlinks from the source filesystem at symlink test evaluation time. But evaluating symlinks by reading from the source filesystem is fraught with difficulties, not least the fact that the existence of the symlink in the source filesystem is no guarantee that the symlink exists in the output filesystem. Additionally there is never any guarantee that the source filesystem hasn't changed whilst evaluating it rendering any checks meaningless. The fix to this has been to decide evaluating symlinks at exclude time when the directory stucture has not been fully scanned causes insurmountable problems. The solution to this has been to introduce a new prune action, which is evaluated on the fully scanned directory structure. This alleviates all the aforementioned problems. So, now that the prune action has been implemented, this checkin moves reading of symlinks to the dir scanning phase, so that the snapshotted values are available for the symlink test operations. An additional minor improvement is that failure to read the symlink for some reason is discovered at dir scanning time allowing Mksquashfs to ignore the symlink. Previously because reading the symlink was performed at filesystem creation time, failure to read meant a dummy empty symlink had to be created. This is because at filesystem creation all the metadata for the filesystem has been computed and partially written, and this includes the count of the number of inodes. This is called a "minor improvement" because in practice this situation never occurs because due to the nature of symlinks if Mksquashfs could stat it at dir scanning time, then it is guaranteed to be able to read it at filesystem creation time, unless the symlink has been deleted in the meantime. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
070c0f7fc9677d0041716b7d73a3eb085d9f1a32 |
|
27-Jul-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add a prune action - allow fine tuning of excluding This adds the prune action. This action is designed to do fine grained tuning of the in-core directory structure after the exclude, move and pseudo actions have been performed. Unlike exclude which can be most usefully used to exclude based on the evaluation of the file in question in isolation, prune can be used to do exclusion based on the overall state of the filesystem once exclusion has been done, rather than just the single file. This is for two reasons: 1. At exclude time the filesystem is being scanned and files are being evaluated and excluded. As the filesystem has not been fully scanned, it is impossible to make decisons based on the state of other files. For example, delete directory "xyz" if it has 10 or fewer entries. At the time directory "xyz" is evaluated by the exclude action, the number of files that will be eventully be in it after scanning and exclusion is unknown. Or another example delete file "abc" if file "../../x/y/xxx" doesn't exist in the filesystem. Again, as the filesystem has not yet been fully scanned this may not known when file "abc" is evaluted by the exclude action. 2. Many of the complex context aware test options not only are meaningless at exclusion time, but their complexity means they rely on the in-core directory to be present. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
18eff5a53b61951edbeeb2e3a8fcc474351d1571 |
|
14-Jul-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: use access() as an initial validity check in contained_followlink() if access() returns error then the symlink cannot be dereferenced for some reason, and it is pointless walking the symlink because it will fail. This also deals with cases where a symbolic link is circular, generating -ELOOP, and so we don't have to worry about dealing with loops ourselves. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
aa83ecbbeab8e74668ee5d4a49ea32e939340044 |
|
12-Jul-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add dir_ent to action_data structure dir_ent is needed for the contained() test operator and for the new contained_followlink() test operator. Note: action_data contains some fields which are copied from dir_ent, and are thus now duplicated. This will be cleaned up in the near future. Historical note: the action_data structure when it was originally created back in 2012 didn't use the dir_ent structure because at that time the dir_ent didn't exist when the actions code was called to evaluate the exclude action(). Iff the exclude action returned FALSE the dir_ent structure was created then. Since then dir_scan1() has been restructured to create the dir_ent structure before any actions code is called. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9f59596c5886b729724b17a7aea12ac526cb53ee |
|
07-Jul-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: fix empty action The empty action leaves orphaned inode entries in the inode_info[] table. These entries because they are orphaned do not (correctly) get allocated an inode number. However, write_inode_lookup_table() does not deal with these orphaned inode entries with an inode number of 0, and thus writes outside of the bounds of inode_lookup_table[] causing memory corruption. Fix this by adding code to skip any orphaned inode entries - that is an inode number of 0. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b29dd5e75b0432fc1d1f46ba9645598e5917e163 |
|
23-Jun-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add new contained() test operator for symbolic links Test if a symlink appears to be within the source filesystem, that is, it has a relative path, and the relative path does not appear to backtrack outside the source filesystem using "..". This test function does not evaluate the path for symlinks - this is deliberate, as this makes the test fast, but in the presence of symlinks in the path it can fail to identify paths which do go outside the sourcefilesystem. If this circumstance may occur, then you should use contained_realpath(), which does follow symlinks, but which is hence a much more expensive test. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b772123132d1a5a6466060e219816f401ba6fe2b |
|
22-Jun-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add new exists() test operator for symbolic links Add new exists() operator that tests whether the file pointed to by the symlink exists (in the source filesystem). This can be used to exclude symlinks in the filesystem which are dangling. Note, this operator does not attempt to determine if the referenced file is inside or outside of the filesystem being squashed. Other additional test operators will be added to do that. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
97ad5e828a9b4f519cc62f2ad052a35bcd3fb871 |
|
16-Jun-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix abort on failure to get physical memory due to /proc missing sysconf(_SC_PHYS_PAGES) which Mksquashfs uses to get the amount of physical pages fails if /proc isn't mounted, returning -1. This causes Mksquashfs to abort with a physical memory less than SQUASHFS_LOWMEM error. Fix this by defaulting to the minimal value of 16 Mbytes, and allow the user to use -mem to set the value to a higher value. Also issue a warning to this effect. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
368becc8e11919827e1998e5b8e0508999e422f3 |
|
11-Jun-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: ensure value does not overflow a signed int in -mem option Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
285a2fd87046fa010b6413635ec2b942c17195c5 |
|
10-Jun-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix phys mem calculation for 32-bit processes on PAE/64-bit kernels When adding the code to base default memory usage on physical memory (by default use 25% of physical memory), I made an oversight. I assumed the process would be able to address 25% of physical memory. However, for 32-bit processes running on a PAE kernel or 64-bit kernel, 25% of physical memory can easily exceed the addressible memory for a 32-bit process, e.g. if a machine has 24 GB of physical memory, the code would asume the process could easily use 6 GB. A 32-bit process by definition can only address 4 GB (32-bit pointers). But, due to the typical kernel/user-space split (1GB/3GB, or 2GB/2GB) on PAE kernels, a 32-bit process may only be able to address 2 GB. So, if Mksquashfs is a 32-bit application running on a PAE/64-bit kernel, the code assumes it can address much more memory than it really can, which means it runs out of memory. The fix is to impose a maximum default limit on 32-bit kernels, or otherwise to never use a value more than 25% of the address space. If we assume the maximum address space is 2 GB, then the maximum becomes 512 MB. But, given most kernels used the 1GB/3GB split, that may be unduely conservative, and 25% of 3 GB (756 MB) may be better. This patch compromises on 640 MB, which is mid-way between the 512 MB and 756 MB values. It is also the fixed default value previously used by Mksquashfs. This patch also alters the code which imposes a maximum size. Previously it was believed limiting to the physical memory size was adequate. But obviously this needs to be updated to take into account a 32-bit process may only be able to address 2 GB. In the process I've also taken the opportunity to limit all requests to no more than 75% of physical memory. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
eafab8bb8be70b6abffaa0841512d1b3ced91794 |
|
13-May-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: This really is the release Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
07def8b5589b06afd7bd82ee0e6fc50063608e8a |
|
11-May-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix LOWMEM check in -mem option Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1ac3715b795c39b6fee7c34e39cb274cbbb83a48 |
|
10-May-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: optimise fragment duplicate checking Oops, one last commit before release, which I noticed I'd forgotten to do when writing up the release notes ... Make the uncompressed fragment cache and the reserve cache grow to maximum size before re-using freed items on the free list. Up until now (unless we're appending) it has been policy to re-use items on the free list if available, rather than grow the cache. This was done for a very good reason, up until recently Mksquashfs lacked the ability to tune its memory usage to the amount of memory in the machine being run on. Lacking the ability to determine if the maximum size of the caches was a good fit for the machine, it has always been wiser to avoid aggressively growing the caches, and to only allow the caches to grow as a result of readahead. The advantages of doing this was it actively avoided growing the caches so they were too large for the machine being run on, if it had low memory. The flip side of this is the caches often times never grow to maximum size. This is important because the size of the fragment cache directly affects fragment lookup performance in fragment duplicate checking. The larger the cache, the more likelihood the fragment being looked up will still be in the cache, and this avoids a costly re-read from the filesystem and decompress. So on the one hand the failure to aggressively grow the caches has been good, on the other hand it has always impacted the performance of fragment duplicate checking. Now that Mksquashfs accurately tunes its memory usage to the amount of memory in the machine being run on, we don't have to worry about aggressively growing the caches to maximum size - we know the computed maximum size will not be larger than the machine can handle. So change to growing the caches in preference to taking off the free list. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
68449e7543299e6e4fbc0c2f519ba9ae487e7331 |
|
06-May-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: update version for release Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
57e2f6986d1091f896280053386802bb851b7258 |
|
06-May-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: make -mem take a normal byte value, optionally with a K, M or G Rather than the hack I used for the original -xxx-queue options which took a integer value which was considered to be in megabytes. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3219ed7f2d2ef1657d25567032e82b55130c4b7b |
|
30-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: allow [KM]bytes to be specified as well as just KM When an option takes a number with an optional multiplier, extend the code to allow a trailing "bytes" to be specified. Even though this is not going to be documented, people don't read the manual text or usage text, and will specify [KM]bytes and wonder why it's not allowed. In otherwords, it's just too much potential pain not to allow for a trailing bytes string. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b74a59c0ad5fd260f1e40d9bcf857b3e4faf0295 |
|
30-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Update usage text to show -b option now takes K or M suffix Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a8c9ff255d558fc86cc38f814b8a5626fcc0d702 |
|
29-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix limit on the number of dynamic pseudo files Dynamic pseudo files exist to enable users to dynamically create files which don't actually exist in the source filesystem, where the contents of the file are obtained from running a command or piece of shell. For instance "a_file f 0777 root root dmesg" will create a file named "a_file", which has the output of "dmesg" as its contents. When I implemented "dynamic pseudo files" I anticipated they would be used for a limited amount of files. As such, when I implemented them, I had Mksquashfs at start-up run through the set of dynamic pseudo files and fork and exec the commands/shell upfront, with Mksquashfs later reading from the pipes connecting the forked processes at file system generation when that part of the filesystem was generated. Doing this ensured maximum parallelism, as it allowed the forked processes to run and produce output in parallel with Mksquashfs. By the time the output of the processes was needed in filesystem generation it was anticipated the forked processes run in parallel would have finished any computation, and would be waiting to output (or if the output was small, it would already be buffered in the pipe). But this strategy had a known defect. It relied on the fact that the total number of dynamic pseudo files when kicked off in their entirety at Mksquashfs startup would not exceed process limits or open file limits (each pipe created uses fds, and there's normally omly 1024 that can be open at the same time by the ultimate parent Mksquashfs process). Due to the fact I assumed dynamic pesudo files would be only used for a limited number of files, this seemed like worrying about a defect that would never in practice occur. But, quite unexpectedly, I received a bug report last year where a user tried to do exactly that, a pseudo file with more than 1000 dynamic pseudo files, and of course Mksquashfs failed when the maximum open file limit was reached. So, this commit fixes that bug. Dynamic pseudo file process creation has been moved to the reader thread, and the process is created when the output from that process is needed in filesystem generation, ensuring the reader thread can read the sub-process' output and wait for it to die and reap the resources used (pipe fds etc.) before starting another dynamic pseudo file process. This ensures the minimal amount of processes/fds/memory is in use at any one time by the pseudo file processes and therefore prevents users from "mis-using" the dynamic pseudo facility to create a DOS (denial of service) situation where system limits are exceeded. Note, I do not suspect the user who reported the bug of trying to deliberately exploit a weakness in Mksquashfs to generate a DOS situation, this appears to be one of the cases where a user wanted to create many dynamic pseudo files and came accross this bug by accident. But, this bug needed to be fixed, both for the users who need to create lots of dynamic pseudo files, and to close a "system resource exhaustion" vulnerability. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
78784bbc7d30d1ebe4b8b9e914a01da7fd543ae1 |
|
28-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix larger than physical memory check Get_physical_memory() should have been returning the full amount of memory in the system, rather than the amount of physical memory taken by default (physical memory / SQUASHFS_TAKE). This inadvertantly broke the "larger than physical memory" check because it assumed get_physical_memory() returned the full amount. In fact it broke running Mksquashfs without -mem because the default amount of memory taken failed the check (default amount of memory taken is always going to be greater than or equal to the default amount of memory taken!). Apologies to anyone affected by the breakage. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b337f95aad5dade44bc14890e8e42900713b7471 |
|
24-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: undocument the -xxx-queue options in the usage text Undocument the old deprecated -read-queue, -fragment-queue and -write-queue options in the usage text. The rationale for this is quite simple: we want to present a single -mem option that is simple and obvious enough that people will use it. Rataining the -xxx-queue options adjacent to the -mem option will solve nothing, we merely add to the set of options that in conbination are so confusing. The effectiveness of the -mem option will be completely lost if people are confused how it relates to the -xxx-queue options, should both be set etc.? In effect the simplicty and obviousness of the -mem option only is achieved if it is the only documented memory setting option. To have it as just one option amongst many options will merely add to confusion rather than reduce it. But, because existing scripts may use the -xxx-queue options "invisibly" retain them for backwards compatibilty, but don't document then for future use. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
48d42fc7f5720310c452d0707932805bf8d3fc02 |
|
24-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add a new -mem <mbytes> option Add a new -mem <mbytes> option, that sets the amount of memory Mksquashfs uses to <mbytes>. Internally, the <mbytes> is distributed amongst the four caches: reader cache, fragment cache, block writer cache, and fragment writer cache in an optimal ratio, as is already done when deciding how to allocate the default physical memory amongst the caches. This option is intended to be much more understandable than the previous -read-queue, -fragment-queue and -write-queue options, such that people might actually use this option (whereas it is clear nobody used the previous options, as they were evidently too difficult to understand). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c3af83a34d8ccf72278d4ee824f3d57f31b79ce1 |
|
21-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: rewrite default queue size code so it is based on physical memory For many years Mksquashfs has used fixed size default queues. This has made choosing a *usable* default set of queue sizes impossible because, obviously, I have no idea what size physical memory people have in their machines, or what what amount of memory they want Mksquashfs to use by default. Choose a too large set of queues, and this means Mksquashfs won't be able to be used on machines with smaller RAM, and/or it will go into swap and suffer extremely poor performance. Choose a too small set of queues, and we don't maximise Mksquashfs performance by using the available RAM on machines with lots of memory. My original decision was to choose an extremely conservative set of queues, only 64Mbytes for Read-Queue and Fragment-Queue, and 512Mbytes for the Write-Queue which because the writer thread is never the bottleneck is not expected to grow beyond ~20% of the maximum. So a total queue size of less than 256Mbytes, which was conservative when I made my estimate of the "usable RAM in a typical machine" in 2006 where I anticipated the typical machine might have 2Gbytes of RAM. It is now rediculously small. My expectation was most people would see that the defaults were (deliberately) made small, and use the -XXX-queue options to increase the queue sizes to something more usable. This AFAIK has not happened. People just run Mksquashfs, and as if by magic, they expect Mksquashfs to just use the right amount of memory. One reason for this I suspect, is that I made a major mistake in presenting 3 raw queue-size options to the user. Most people have no idea what the queues are, and have no idea what the right ratio is between the 3 queue sizes... and obviously think changing them "ramdomly" will break Mksquashfs and just leave well alone. The moral of the story is if you expect/hope people will increase the memory used by Mksquashfs, then make sure you give them options they will understand.... and if they don't change the options make sure your default memory size is at least sensible for their machine. I failed twice last time. This commit is step 2. Base the default queue sizes on the amount of physical memory. In this I have choosen to use a 1/4 of physical memory. Any more than this and we can't guarantee we'll hit memory pressure on a loaded machine, anything less than this, and we get back to the silly amount of memory usage issue. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
528d16d9f18ed35ba23cafeecdc3ca1fef3d7740 |
|
21-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: update date Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
7a28f7a57b9b1fec0f6f1a0ab0cd94dd7881d673 |
|
21-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
pseudo: fix pseudo definition dumping and actually call it Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
66d8b8e55edef4b78cc4e78eb4fc7cea94e44ea9 |
|
20-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: exclude files, fix handling of leaf name If a pathname ended in "/" (i.e. "a/b/c/") the last pathname component would not be recognised as a leaf name. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d3459a838168bbe926d8deabb3c84f369a33f5c4 |
|
18-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: sort_directory(), silence bogus cur NULL pointer dereference Static analysis reports a cur NULL pointer dereference at the cur->next=NULL line. This is because static analysis is too stupid to realise we'll always go around the loop at least once, assigning cur, iff dir->count > 1, which is checked for. In otherwords it does not correlate dir->count > 1 with the fact dir->list will always be non NULL. Even though it is strictly unnecessary, it is easily to silence static analysers by checking for dir->list == NULL as well as dir->count > 1. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f2f83b6e8e5ad2c19a49a46e0ed8c1968c93abac |
|
18-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: write_inode_lookup_table(), remove redundant initialisation of inode Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
943acada7a60a048b4be53a4df1e94e8b10e08a6 |
|
17-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix a potential non-default option deadlock Fix a potential deadlock in Mksquashfs that may be triggerable using non-default options. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
cf4c7bcdaf53ff2f198539b093f3b9c5d6f301c3 |
|
13-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: shorten the {reader|fragment|writer}_buffer_size variables Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c4a8a79f0c9177c7cc4f5ff63515516ca3b3fe64 |
|
10-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix unmatched pthread_cleanup_push/pthread_cleanup_pop Get_fragment_checksum() could in certain cases return with a pthread_cleanup_push context still unpoped. This caused a crash or hang when terminating early in appending. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3794e341d1a4da4f133b593fc94bd18574574016 |
|
10-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix delay in restoring filesystem if stuck in filesystem scanning If when appending, control C is hit twice, Mksquashfs should respond by restoring the filesystem and exiting. Previously I discovered Mksquashfs might hang when generating the filesystem for some time when control C was hit. This I discovered was due to the fact the Mksquashfs main thread might not hit a pthread cancellation point for sometime. I fixed this by updating the restore thread to carefully terminate the producer threads and flushing the queues that feed the Mksquashfs main thread, so that it would quickly hit the pthread_cond_wait() cancellation point on empty queues. This works well, and avoids the messy need to insert an explicit pthread_testcancel() within the filesystem generation code. However, I have discovered Mksquashfs can still hang for sometime if control C is hit when Mksquashfs is *scanning* the filesystem prior to starting filesystem generation, if the source filesystem is large. This is again because the filesystem scanning code does not execute any pthread cancellation points, and as it has not yet started filesystem generation, it does not try and read any data from producer queues. The fix here is to exploit the fact that only at filesystem generation time does the destination filesystem get written to, necessitating it to be restored on termination. Prior to this point we can safely exit Mksquashfs without restoring the filesystem (because as yet it hasn't been alterred). So move the creation of the restore thread to just before filesystem generation, with the result that prior to this point Mksquashfs will exit without trying to restore the filesystem, and we avoid trying to pthread cancel code which does not execute any pthread cancellation points. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
73dece4171511b141fb703e078b75b657af37b37 |
|
04-Apr-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
progressbar: fix mutex locking in {en|dis}able_progress_bar() enable_progress_bar() and disable_progress_bar() used to be only called by the info thread which was not terminated when Squashfs exited prematurely on error or if ^C hit twice. So we did't need to have any pthread_cleanup_{push|pop} code. Now, however, they are used by the ERROR_START() and ERROR_EXIT() macros, which can be called by any thread, so we need to protect the mutex lock against pthread cancel operations. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8bb17b0275fa35318ad35c8fd477023004f940aa |
|
31-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: significantly optimise fragment duplicate checking Remove the last remaining parallelisation bottleneck in Mksquashfs - fragment duplicate checking which was previously done on the single main thread. Back in 2006 when I first parallelised Mksquashfs, doing this on the main thread was initially not considered to be too much of an issue. If you don't have (m)any duplicates then you avoid the issue full stop. But even when you do have fragments which need to be checked, the necessary work of memcmp (memory compare) is not too arduous and is much faster than the upstream file reader thread, and much much faster than the downstream fragment compressor thread(s), and so if Mksquashfs is running slow then this is "not the bottleneck you're looking for", that's going to either be fragment compression or file reading. This is on the basis most duplicates are local and the fragment referenced can be found in the fragment cache. But often when I ran Mksquashfs and had a lot of duplicates the performance of Mksquashfs would be disappointing, normally without duplicates, I expected to get full processor utilisation, but with duplicates you might get roughly 200% or even 100% (i.e. one processor core), at least for the time it was hitting a run of duplicates in the source filesystem. Increasing the size of the fragment cache would reduce the performance hit. Which gave a substantial hint the problem was fragment cache misses which caused fragment blocks to be read back off disk and decompressed on the single main thread. But it was evident that wasn't the whole story. The culprit has always self-evidently been the single threaded duplicate checking on the main thread, this has been apparent almost since the initial parallelisation of Mksquashfs in 2006, but although I've had my suspicions as to why (the hint above), with the demands/prioritisation of extra functionality, this has remained on my TODO list until now. Analysis now has shown the problem to be a triple whammy: 1. With duplicates (and even without), there are substantial fragment cache misses, which make the single main thread spend a lot of the time duplicate checking reading in fragment blocks off disk, decompressing them, and then memcmp'ing them for a match. This is because with a large filesystem, many fragments match at the checksum level even though they're not actually a match at the byte level - the checksums eliminate most files, but if you've got a large filesystem that still leaves multiple files which match, and this match is random, and does not follow locality of reference. So invariably these fragment blocks are no longer in the fragment cache (if you're compressing 1Gbyte of files and have a 64Mbyte (default) fragment cache, most checksum matches will invariably not be in the cache, because they do not follow the "locality of reference rules", the checksum matches can literally be anywhere in the part of the filesystem already compressed and written to disk). The checksum matches in theory could be reduced by improving the discriminating power of the checksums, but this is a zero sum game, the extra processing overhead of computing a more sophisticated checksum for *all* blocks would easily outweigh the benefits of less checksum matches. 2. Even with the knowledge the main thread spends a lot of the time reading in and decompressing fragment blocks, we're left with the fact the main thread has enough "bandwidth" to do this without becoming a bottleneck, so there's more to the story. The "more to the story" is that the main thread spends most of its time asleep! As fragment compression is the bottleneck in any Mksquashfs run, we run out of "empty fragment blocks" because all of the fragment blocks become filled, and get queued on the fragment compression threads waiting for them to be compressed. So the main thread sleeps waiting for an "empty fragment block" even though it has a queue of files which it could be duplicate checking. 3. When the main thread does wake up having got an "empty fragment block" and it starts to do duplicate checking, if that duplicate checking takes a long time (because it has to read in fragment blocks and decompress them), then it 1. stops passing fragments to the fragment decompressor threads, and 2. stops taking fragments from the reader thread... So both the fragment compressor threads and the reader thread starve. Now, because both the reader thread and the fragment compressor threads have deep queues, this doesn't happen instantaenously, but only if the main thread hits a run of files which need multiple fragment blocks to be read off disk, and decompressed. Unfortunately, that *does* happen. So, we end up with the situation the main thread doesn't duplicate check files ahead of time because it is blocked on the fragment compressor threads. When it does wake up and do duplicate checking (because it didn't do it ahead of time), it ends up starving the fragment compressor threads and reader thread for that duration - hence we get a CPU utilisation of 100% *or less* because only that main thread is running. The solution is to move duplicate checking to multiple one per-core front end processing threads ahead of the main thread (interposed between the reader thread and the main thread). So the front-end threads do duplicate checking on behalf of the main thread. This eliminates the main thread bottleneck at a stroke, because the front-end threads can duplicate check ahead of time, even though the main thread is blocked on the fragment compressors. In theory simple, in practice extremely difficult. Two issues have to be dealt with: 1. It introduces a level of fragment cache synchronisation hitherto avoided due to clever design in Mksquashfs. Mksquashfs parallelisation is coded on the producer-consumer principle. The producer thread creates buffers in the cache, fills them in, and then passes them to the consumer thread via a queue, the consumer thread only "sees" the buffers when they're read from the queue, at which time the consumer and producer has inherently synchronised, because the consumer only gets them once the producer thread has explicitly done with the buffer. This technique AFAIK was introduced in CSP (communicating sequential processes) and was adopted in the largely forgotten about descendant OCCAM. This technique eliminates explicit buffer locking. The front-end threads break this model because we get multiple threads opportunistically looking up fragments in the fragment cache, and then creating them if they're not available. So we get the problem threads can lookup buffers and get them whilst they're still being filled in, and we get races where two threads can simultaneously create the same buffers. This can, obviously, be dealt with by introducing the concept of "locked" buffers etc. but it means adding an additional set of cache APIs only for the fragment processing threads. 2. The front-end threads have to synchronise with the main thread to do duplicate checking. At the time the front-end threads do duplicate checking, there may exist no duplicates, but the duplicate may exist being duplicate checked itself. Think of the case where we have two files alphabetically one after another, say "a" and "b", "a" goes to front-end thread 1, and "b" goes to front-end thread 2, at this time neither file "exists" because it's being duplicate checked, thread 2 cannot determine file "b" is a duplicate of file "a" because it doesn't "exist" at this time. This has to be done without introducing an inherent synchronisation point on the main thread, which will only reintroduce the main thread bottleneck "by the back door". But is actually more complex than that. There are two additional points where synchronisation with the main thread "by the back door" has to be avoided to get optimum performance. But, you'll have to look at the code because this commit entry is too long as it is. But, the upshot of this improvement, is Mksquashfs speeds up by 10% - 60% depemding on the ratio of duplicate files to non-duplicate files in the source filesystem, which is a significant improvement. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
94e658fd6e8d7840c0a51e43fbe123967c1e7982 |
|
13-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: statically initialise fragment_mutex Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ea8cb65d286bcba925f10cf9ba57f3c8bfae7b8b |
|
13-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: initialise pos_mutex Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c6424dc4d55a711ff862409fa07b9c143049aba7 |
|
13-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
process_fragments: move fragment checksumming to the process fragment threads Move fragment checksumming to the process fragment threads, and away from the main thread. This has a couple of minor side effects: 1. Tail end fragments (fragments belonging to files larger than the block size) are now checksummed up front. 2. This means add_non_dup() gains an extra checksum_frag_flag, because we now have a combination of True/False statuses for the block checksum and the fragment checksum. Previously, we either had both the block checksum and fragment checksum, or neither. (fragments pre-existing on disk on append are not checksummed up front). 3. duplicate() no longer needs the fragment checksum to be passed, because it is contained within the file_buffer structure which is always passed. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ce119e7d18f12526af62b06e45b0a35a2719b8f5 |
|
11-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: reader_read_file(), optimise byte away Plus re-organise some code to make flow cleaner, and to take advantage of the fact that we are now using blocks as a decrementing counter, so we easily know if this is the last iteration. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
191dfcd07d63a063eb20315437758cbe4def3d05 |
|
11-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: reader_read_file(), optimise expected away This also fixes a bug in handling files of an exact multiple of the block size, introduced in the recent commit to remove count. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0a374c00c6dbbf2b129fcbfece29409243e21e4b |
|
07-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: write_file_frag_dup() no longer needs the size argument It is now (and has been for quite a few years) stored in the file_buffer which is also passed in. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
75bd21dc57d6a89fa4be7da852a04bb8c231e403 |
|
02-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: write_file_blocks_dup(), bring into line with write_file_frag_dup() Write_file_frag() does pre duplicate checking, and calls write_file_frag_dup(). Make the behaviour of write_file_blocks() the same. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8678d30300e9366bcbf74630f91f2fa472eaab23 |
|
02-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: reader_read_file(), get rid of count Get of rid of count now it is no longer used. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5e4f0efb8dd485c5dbe0b9e569f462d69343fccf |
|
02-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: reader_read_file(), remove file_buffer->block = count Remove the setting of file_buffer->block to the file block count. This value is never used. A little bit of Squashfs archaeology shows this was in the earliest version of parallel Mksquashfs from 2006, and the value wasn't used then either! It is high time it was removed. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1ee15d8c36088b3788ba411c7ed560d764a74248 |
|
02-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: reader_read_process(), remove file_buffer->block = count Remove the setting of file_buffer->block to the file block count. This value is never used. A little bit of Squashfs archaeology shows this was in the earliest version of parallel Mksquashfs from 2006, and the value wasn't used then either! It is high time it was removed. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
948bf3aec767bd06433ec5201d51224ead2f9ec0 |
|
02-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: pass reader_buffer to write_file_empty() Make the behaviour of write_file_empty() match the other write_file_*() functions, where it deletes the reader_buffer. This removes the messy special handling of write_file_empty() in write_file() where it has to delete the reader_buffer but only for write_file_empty(). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c348913db46112769cb37e88f8211adcc0af52cb |
|
02-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: tidy up code in write_file() by shrinking variable names Plus eliminate the unnecessary jump to file_err. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c4b442f38eac44e844f40879796bf96123a9c552 |
|
01-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: write_file_blocks() no longer needs the read_size argument It is now (and has been for quite a few years) stored in the file_buffer which is also passed in. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1807caa21dd84043cc0a29f9832428b2a6490afb |
|
01-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: write_file_blocks_dup() no longer needs the read_size argument It is now (and has been for quite a few years) stored in the file_buffer which is also passed in. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8531f879584d4d6b7b5a700a9b4a34ea59eb1387 |
|
01-Mar-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: write_file_frag() no longer needs the size argument It is now (and has been for quite a few years) stored in the file_buffer which is also passed in. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
462ee3ee9e492e2e0dd2b8e5ca63d230cc5aad7b |
|
28-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: write_file(), read_size is now largely redundant eigned-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
bd0526bb5cdf9e7f6eee3d18cd860165ba78e7a2 |
|
28-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: write_file() only set status if read buffer errored Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
77ffc7eadcf199489a4764c6badcc8487ad5d0b8 |
|
24-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: fix parsing of "G/M/K" size specifiers in number parsing Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
84e20d70e906c24483d0b9dc6a38f310ee78728d |
|
23-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: change cache_rehash() to cache_hash() Originally caches in Mksquashfs on calling cache_get() were always hashed to the index supplied on calling cache_get(). For writer blocks obtained in the deflator() threads this created a problem because at the time of getting the cache block the ultimate index was not known (the index is the disk location where the block is finally stored, which is not known until the writer block is processed by the main thread). The solution adopted then was to cache_get() the writer block with a dummy index, and later when the real index was known to rehash the writer block. This was good and worked well. However, since then a new cache_get_nohash() call has been implemented. This was introduced for reader buffers which are not looked up and therefore never need to be hashed. We can use this new call here by changing cache_rehash() to cache_hash() - get an initial unhashed buffer via cache_get_nohash() and later create a hash mapping via cache_hash(). The semantic changes from cache_rehash() to cache_hash() are because we are non-longer rehashing (removing an existing hash and adding a new hash) but adding a hash to a cache entry that has never been hashed. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9de84acd2fcc5992704a433c0de402fcd8a5d143 |
|
20-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: introduce additional per CPU fragment process threads The following commit commit 287f3ef6b1cd670f3ff347dcaaa7b0bade03096b Date: Sun May 19 04:27:38 2013 +0100 mksquashfs: queue fragment and empty file buffers directly to main thread moved fragment and empty file buffer processing away from the deflate thread(s), and queued them directly to the main thread. This was done to ensure the "queue dump" facility added to Mksquashfs when it showed the "reader -> deflate queue size" was showing the number of *file buffers* waiting to be compressed by the deflate thread(s). Previously when the queue also held fragments (because sparse checking of fragments was piggy-backed onto the deflate threads), the queue size shown included both fragments and file buffers waiting to be compressed. This limited the usefulness of the queue dump in determining what was happening within Mksquashfs. A consequence of this, however, was that sparse checking of fragments was moved to the main thread. In hindsight, this could cause a performance regression in certain cases because there is only one main thread (it is not per CPU) and it is tasked with overall coordination of Mksquashfs, adding the additional burden of sparse checking could bottleneck the main thread, leading to bottlenecking of the other threads and a loss of parallelism. In general this change broke the general rule that the main thread should only deal with coordination and processing should be done on other per CPU threads. So fix this by introducing an additional per CPU fragment processing thread which deals with sparse checking of fragments. Note: it is expected that moving sparse checking to the main thread may only have caused a problem with duplicate checking where the main thread becomes otherwise engaged, and even then only in the extremely rare case many fragments are sparse. In general, fragments are mostly trivially verifiable as non-sparse (first few bytes non-zero), and the sparse check is therefore extremely fast. Moving sparse checking to fragment processing threads is a first stage iteration, the aim is to move the other more CPU intensive fragment processing which is currently done on the main thread to the new fragment processing threads too, as this should improve performance. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3aa58da3a26d4bed5a0d8c865cb0f400a35cffcb |
|
18-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: fix parsing of numeric uid and gid Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b4fc3bf1abd7cf8d65cc68ad742a254d76f5da09 |
|
06-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: optimise duplicate checking when appending When Mksquashfs is appending, the checksums for the fragments in the original filesystem are lazily computed on demand - when we get a possible duplicate where the possible duplicate fragment is stored in a fragment block in the original filesystem, it is read off disk, decompressed, and the fragment checksum computed. This allows fast startup as the fragment checksums are not computed upfront, and of course if we never get a possible duplicate stored in a particular original fragment block, it is never read off disk. But, when we read the original fragment block off disk, we compute the checksum for the fragment of interest only, and then store the fragment block in the fragment cache. If we get a reference to another fragment stored in that fragment block, and the fragment block is still in the cache, then we re-use it. If on the other hand, the fragment block has been aged out of the cache, we have to re-read and re-decompress the same fragment block. This adds uncessary overhead, and in certain filesystems, where there's lots of duplicate matches but distributed in time, we may end up re-reading the same fragment blocks many times. This commit adds an optimisation, when we read a fragment block off disk, we compute the fragment checksums for *all* the fragments stored in the fragment block. This avoids the situation where we have to re-read the fragment block off disk if the fragment block disappears from the fragment cache before we get another duplicate check reference to that fragment block. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ce2fef5e9d6e31648e93bda430fee37f0929c583 |
|
05-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: move a couple of things into mksquashfs.h Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
557cefa4b01c4de1e7fb7fe8483a6918ea415dda |
|
05-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: split checksum_flag Split checksum_flag in file_info structure into two, one each for fragments and blocks. This allows the pre frag duplicate check routine to skip the block checksum computation, and in future it will allow the fragment checksum for all files in a fragment (when the fragment is read off disk in appending) to be computed, skipping the block checksum computation. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a9087acc2c2813bc1045f092a325c622a3f87016 |
|
05-Feb-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: reorganise struct file_info Saves 8 bytes on 64-bit architecture. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
85776df7ba8c5a0bb56ddccfff2bf6a0fc48cac8 |
|
31-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: add new -exit-on-error option Mksquashfs recognises two kinds of error: - Fatal errors which cause it to abort, and - Non fatal errors which it considers can be safely ignored These "non-fatal" errors are generally failure to read files or directories, when this happens Mksquashfs skips or stores an empty file and continues (flagging up what it has done to stderr). From early feedback from users, this is generally considered a better option than aborting. Often-times users are aware that there are files which cannot be read by Mksquashfs, and want Mksquashfs to automatically ignore them without having to explicitly exclude them on the command line (for instance it may be known that there are files owned by other users). Or for instance archiving a filesystem which is known to be partially corrupted, and it is expected it will generate I/O errors on one or more files (which are obviously unknown beforehand and cannot be explicitly excluded). Additionally, often-times users do not know that there are files which cannot be read, but would rather Mksquashfs flag these errors and continue, rather than aborting what may be many hours of compression. But I have got feedback which shows in some use-cases this behaviour is undesireable, and would rather Mksquashfs abort at the failure to read any files. So add a new option -exit-on-error which makes Mksquashfs abort on these errors. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8c7408170e92123d639a66ab82c19212d09d66b7 |
|
30-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: use pthread_kill() to signal restore thread Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0280d993d236ac2b529744800f608ba998785017 |
|
27-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
restore: redo thread termination when restoring filesystem on appending I recently reworked filesystem restoration in Mksquashfs where ^C is hit twice when appending. When this happens Mksquashfs has to terminate all the threads and restore the filesystem. Originally, when Mksquashfs was enhanced to do multi-threading (parallelised), this was done by sending all the threads a signal and then having them go to sleep in their signal handlers. This was an acceptable solution, but, it suffered from the fact threads could go to sleep holding pthread mutexes, and so workarounds had to be added for that. But an advantage was thread cancellation was instantaneous. The rework redid things to be cleaner, restoring is now done on a special restore thread, rather than the setjmp/longjmp inherited from the original single threaded Mksquashfs, and thread cancellation is now done via the pthread_cancel mechanism, ensuring threads do not go to sleep holding mutexes, allowing the workarounds to be removed. However, on slow computers, I have noticed an annoying tendency for the new code to "hang" for an apppreciable time when ^C is hit twice, without any activity apparently taking place. The new cache/queue dump code (which is run when ^\ is hit twice, and which can be run while Mksquashfs is restoring), neatly pin-pointed the cause. During thread cancellation, the decompress and fragment decompress threads continue to run taking input from their input queues, and delivering it to their output queues, and only terminate when either there is no more input or there is no more space in the output queue. This behaviour was tracked down to the fact that the decompress and fragment decompress threads do not ordinarily execute any code which is a pthread cancellation point - the only call executed which is a pthread cancellation point is pthread_cond_wait which the threads only execute if either a queue is empty or full. Now, this problem could be fixed by the insertion of an explicit pthread cancellation check call (pthread_testcancel) but this potentially slows down the most compute intensive threads in Mksquashfs, for an eventuality (thread termination on appending if and only if ^C is hit twice) which is very rarely going to happen. So the solution that has been adopted is to rework the thread termination code to forcibly cause each thread to idle. What this means is thread termination is now carefully done, thread termination is now done starting from the ultimate source thread (the reader thread), the queues from that are flushed, causing the "downstream" threads to idle, which are then terminated, their output queues are flushed, causing the threads downstream from them to idle, which are then cancelled, and so on until the ultimate destination thread (the writer thread) is cancelled. This results again in instantaneous thread cancellation when ^C is hit twice, irrespective of slow CPU speed or slow output devices which may have resulted in large queues of unprocessed buffers. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ce719d314c7ffdbf49cf8c091aa19c819f5ba1ce |
|
24-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
restore: moving pthread cancelling into restore.c from mksquashfs.c Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
cd1a5a664eef68b159c22a7b51fac002a9f27826 |
|
21-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: move progress bar disable Originally when file writing had finished in dir_scan() the progress bar was disabled. However, at this point there can be queued fragments still to be compressed, and blocks queued still to be written. On a fast system and fast output device, this doesn't matter, as the gap between the progress bar stopping and mksquashfs finishing is small, as any fragments and blocks are quickly dealt with. However, on a slow system or a slow output device, large queues of fragments and/or blocks can have built up, which may time a while to compress and/or write. Having the progress bar stop before this is done can be confusing, as it looks like Mksquashfs has hung. So move progress bar disabling to after fragment compression and block writing has finished. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
434d50c9620c4fdb6dd066edffaf8c5e1b3d4da4 |
|
21-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mksquashfs: flags should be set using TRUE/FALSE and not 0/1 Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
bae0e421ffa8e3a33338cf833357f4d39518be8a |
|
20-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix progress bar enabling/disabling Previously I rewrote the progress bar to introduce temporary disabling and enabling for the info thread (when it is displaying the cache/queue status the progress bar needs to be disabled). This commit unfortunately didn't go far enough, it left the situation where: 1. mksquashfs at start-up enabled the overall progress bar enable flag (but didn't turn it on) 2. Used the call "enable_progress_bar" to turn on the progress bar, and 3. Used the call "disable_progress_bar" to disable the progress bar once compression had been done (prior to generating the statistics dump and exiting). This was a significant improvement in that hitting ^\ twice no longer resulted in the progress bar being enabled even if it had been explicitly disabled on the command line, but, it has been noticed (by me) that there were still some weird cases: 1. Hitting ^\ twice to display the cache/queue status *before* the progress bar was turned on by mksquashfs would prematurely enable the progress bar. 2. Hitting ^\ twice to display the cache/queue status *after* the progress bar was turned off by mksquashfs would turn the progress bar back on. The reasons for this should be readily apparent: In case 1. the enable_progress_bar() called by the info thread to re-enable the progress bar would prematurely enable it. In case 2. the enable_progress_bar() called by the info thread to re-enable the progress bar would unwantedly re-enable it. The solution of course is that the main mksquashfs thread should never have been using the temporary calls to "hard" enable and disable the progress bar when it wanted to turn on and turn off the progress bar. So update set_progressbar_state() to do the "hard" enabling/disabling when the main mksquashfs thread wants to do it. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
774b7b35e7af3152f0911e7919baab9310605dc2 |
|
07-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add -Xhelp option add -Xhelp option which prints the compressor options for the selected compressor. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b1c3b6af202b5bbb9061b57baebb2b2924a5c69a |
|
06-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: display compressor options when -X option is not recognised Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1f6c74039aa6bf663a9374bfc1c9c4bf681e036d |
|
06-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: redo -comp <compressor> parsing Previously, -X compression options were only supported by xz, a non-default compressor. This led to a perfectly acceptable parsing and error message reporting strategy where -comp xz was needed to be specified first on the command line - the -X options were not understood by the default gzip compressor, and so Mksquashfs needed -comp xz specified first to switch to the appropriate compressor. i.e. phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -Xdict-size 8192 -comp xz mksquashfs: Unrecognised compressor option -Xdict-size mksquashfs: Did you forget to specify -comp, or specify it after the compressor specific option? An acceptable error message saying -comp xz should be specified first. Despite the fact it implies a limitation in the parser such that the appropriate compressor cannot be identified before parsing the -X options. But it led to some silly error messages too phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -comp xz -Xdict-sze 8192 mksquashfs: Unrecognised compressor option -Xdict-sze mksquashfs: Did you forget to specify -comp, or specify it after the compressor specific option? The cause of the failure is the mistyping of the xz specific compressor option, but it still assumes the cause of the failure is the lack of an appropriate -comp xz first. Again, repeated -comp xz's generate a misleading error message phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -comp xz -Xdict-size 8192 -comp xz mksquashfs: -comp must appear before -X options The introduction of compression options for the default gzip compressor exacerbates such misleading error messages. phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -Xcompresson-level 6 mksquashfs: Unrecognised compressor option -Xcompresson-level mksquashfs: Did you forget to specify -comp, or specify it after the compressor specific option? The mistyping of the default compressor -Xcompression-level option causes the error message did you specify -comp gzip after the compressor specific option, when no such option is necessary, because it's the default compressor. Again, giving the -comp gzip option after the -X option ... phillip@ravolox:/tmp$ mksquashfs xxx xxx.sqsh -Xcompression-level 6 -comp gzip mksquashfs: -comp must appear before -X options gives the misleading error message that -comp gzip should be specified before -Xcompression-level, which is completely wrong, as -Xcompression-level can be given before any -comp because it is a compression option for the default compressor. In short, the stateful -comp where it must appear before any -X compression options previously caused some odd error messages, but it is anticipated it will cause even more odd behaviour now that compression options are understood by the default compressor. So, remove the need to have -comp specified before any -X option, and allow it to be specified anywhere. Thereby removing the dependency and the misleading error messages in one go. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
cc06495ccafaf9bb7f3d078dee22f2e3b1af471c |
|
03-Jan-2014 |
Phillip Lougher <phillip@squashfs.org.uk> |
Update dates Have not updated the version dates for a long time. There's been a couple of improvements since then. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
041cf6dfc3665b13c2b3c9256f45bb3922d0ff4b |
|
20-Jul-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: remove "mutex_unlock" label in read_fs_bytes Phread_cleanup_{push|pop} are implemented using a compound statement in glibc. This means an invisible `}` is inserted immediately after the mutex_unlock label. On PowerPC GCC 4.5.2 (and probably others) this causes a label at end of compound statement compilation error. So remove the label. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d96caa566375861cdde8b010320e65bdb02108cd |
|
17-Jul-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
Update dates Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ca43a90cc07f2511652a03f6b23e26143c7a24c1 |
|
08-Jul-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
Update dates Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
37723d2a10882b7927ef9faad0ce87b0e902b7b4 |
|
06-Jun-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Get rid of fragment_waiting which is unused It has been unused since commit 49e4f287beb66a74de3857b5fba77497d9c3753a in 2008, which replaced code which waited for fragments to be written to disk before writing a mult-block file, with the much better "locked fragment" queue. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b1259f7e5b72dd26f7bdd26c0157bb91c21fcb57 |
|
06-Jun-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: don't need to pass oldmask into pthread_sigmask(), it's not used later Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
cf478e9fddfa332b91922ac1c626c5f0d4e65c74 |
|
29-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: rename from_reader queue to to_deflate The from_reader queue used to collect all the data queued from the reader thread (hence its name). Data from the reader thread is now queued to the to_main queue (uncompressed fragments etc.) and to the from_reader queue, which is now soley used to queue blocks to the deflator thread(s). So rename to to_deflate which now more accurately reflects how it is used. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
cd6cb7a98758009138eea0cc6ce9198a80280f1e |
|
29-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: tidy code in unlock_fragments() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
71ad96469a271051aeec43a0037e1831fa86acd6 |
|
25-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add comment to unlock_fragments() saying queue_empty() is not racy Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
6164b5f840437a54d70b1155af0e01fc4bef48d2 |
|
23-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: replace fragment_locked list with a queue Replace the one-off implementation specific fragment locked list with a generic queue. This has both the advantage of reusing generic infrastructure reducing code overhead, and it means the queue and its size can be reported in the dump_status() function. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
03cd80d02e36f46b29a5c72f4318532ffe10fce4 |
|
22-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix rare race condition in "locked fragment" queueing When mksquashfs is writing a file containing multiple blocks to disk, we cannot have the fragment compressors writing their fragment blocks to disk at the same time. This is because files are expected to be contiguous on disk, and having a fragment written in the middle is not particularly useful! But we don't want to turn off fragment compression during this time because this will reduce parallelism significantly. The solution to this is to "lock" fragment output during this time, the fragment compressors continue to compress, but the fragments generated are queued internally to the fragment compressors, and only written once the file has finished being written. This works fine, but there has been a subtle race condition with this fragment locking and fragment lookup in duplicate checking. Fragment lookup in duplicate checking first looks to see if the fragment is still in the uncompressed fragment cache, normally if the fragment has just been compressed and queued to the internal "locked fragment" queue, it will still be there. However, if we've had a run on uncompressed buffers (*), it may have been reused, in which case we will proceed to look for the compressed fragment in the writer cache. When we do this we look up the fragment in the "fragment_table" table, but this table was only updated once the fragment was written to disk, i.e. there was an unlikely small window where the uncompressed fragment had been reused but the fragment was still on the locked queue and so the fragment_table hadn't yet been updated, which would have resulted in incorrect values being read from the fragment_table. Fix this by updating the necessary value in the fragment_table when the fragment is queued to the internal locked fragment queue (and obviously before the uncompressed fragment is released). (*) In fact because the main thread when writing a multi-block file does not create uncompressed fragments in the ordinary way, and because by definition for a fragment to be on the "locked fragment" queue the uncompressed fragment has been released during writing the multi-block file, it is almost impossible for the released uncompressed fragment to be reused. The only way the released uncompressed fragment block could be reused is in the duplicate check itself if it needs to read and decompress a fragment block. This race condition is almost impossible to hit, but it is easy to fix. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b1ed0dfc812ce836a0b26d6f3637f4034d469b5d |
|
20-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: if the fragment is sparse set fragment flag to FALSE This allows a simplification in the logic in the write file routines where if a buffer is a fragment we no longer need to check that c_bytes is 0. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c6a1bc5cce250675d95492cf2701ced1a0e9c8ee |
|
20-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: don't pass queue to get_file_buffer() The queue passed is always to_main, and it is global so passing it is unnecessary. Also changing get_file_buffer() to explicitly use to_main centralises the logic as to which queue is used to get the file buffers rather than having it spread across multiple functions. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0e1656d12ed8573d94f4c2735134aeb7c1a8f5b2 |
|
20-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: change queue name from "from_deflate" to "to_main" The queue now queues buffers sent from both the reader thread and the deflate thread to the main thread, so the name "from_deflate" is wrong, change to "to_main" which correctly reflects the queue usage. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fd99272143d92980b029d4b7e685c9253e7a2677 |
|
19-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix bug introduced changing fragment index in writer buffer A recent commit changed the index used when storing compressed fragment buffers in the writer cache to be negative. This was to ensure compressed fragments stored in the writer cache (indexed on the fragment index) were distinct from compressed block buffers stored in the cache (indexed on the start block in the output filesystem). Unfortunately this broke compressed fragment buffer lookup in the writer cache, which is done when looking up fragments in duplicate checking, and the original uncompressed fragment buffer is no longer available in the fragment cache. Fragment->index is an unsigned int, and so when converted to a negative index via FRAG_INDEX we get a large value rather than the desired negative value. Fix by casting to a long long. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ac73138b9a832a5edbb7512e6c538574909f45b5 |
|
19-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move error reporting from read_from_disk(2) to the caller this allows the error message to be more descriptive Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4bb21cbf7661a2e1f76ea493c5476eb2f4aa11a1 |
|
19-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: queue fragment and empty file buffers directly to main thread Queue these buffers directly to the main thread, rather than queuing them to the deflate threads which pass them to the main thread. For empty file buffers these are passed directly to the main thread, and it is unnecessary overhead to pass them to the deflate threads. For fragments these were passed to the deflate threads for sparse checking, but move sparse checking for fragments to the main thread. Doing this frees up the deflate threads to concentrate on compressing buffers. It also means the reader thread to deflate queue now accurately represents the number of uncompressed buffers in flight to the deflate threads, without the value being obscured by the presence of the other buffers. The number of uncompressed fragment buffers in flight from the reader thead to the main thread can be seen from the uncompressed fragment queue. Also add a function which centralises the logic which decides where to send the buffers. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
137dcfcc5368ae9c78b4a8a7fb780dda21583036 |
|
15-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
caches-queues-lists: fix bug caused by new seq_queue implementation When adding the seq_queue implementation I did not want to increase the existing size of struct file_buffer. This meant I needed to reuse fields that are not used at the time the file_buffer is being enqueued to the seq_queue. The seq_queue implementation was intended to use the free_prev and free_next pointers, as they're guaranteed not to be used (they're used to keep track of free buffers in the caches, which by definition as the buffer is in use, these fields are not in use). Unfortunately, when turning the hash functions into macros I forgot to do this! With the consequence the seq_queue has been re-using the hash_next and hash_prev pointers, which are already in use if the buffer being queued is compressed (and by definition stored hashed in the write cache). Because the effect of this is to mutually corrupt the hash lists, this causes subtle failures in lookup which largely do not cause mksquashfs to fail. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1765698880f0a44f4ea1c6187fb3ffbd7e79a08d |
|
11-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: replace generic queue with specialised "sequential queue" Replace the use of a generic queue and associated code in mksquashfs.c to re-order out of order buffers (see previous commit) received from the deflate threads (and reader thread) with a specialised "sequential queue" that guarantees buffers are delivered in the order specified in the "sequence" field, and which minimises unnecessary wake-ups. It will also ensure that pending queued buffers are held in the queue rather than being "popped" off and held invisibly in a structure private to mksquashfs.c. This will also ensure a more accurate display of queue status when in the queue and cache dump (generated if control \ is hit twice within one second). Currently queue status dumping of the seq_queue isn't implemented so comment that out for the time being. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c0828174d559d614996f39058ec83928ecbdc54c |
|
02-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
info: dump queue and cache status if ^\ hit twice within one second Previously the filename being Squashed would be printed on hitting ^\, and the queue and cache status would be printed if SIGHUP was received. However, sending SIGHUP to generate a queue and cache status dump is a PITA, it cannot be generated from the keyboard and must be sent from another terminal window. Fix this by overloading ^\. Now if ^\ is hit twice within one second dump the queue and cache status. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
53240e6cf95a213cc6077020d28b85b98b5e1eda |
|
01-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
frag_deflate_thread: move pthread_cancel_{push/pop} out of loop Now we're not using pthread_cleanup_pop(1) to do the mutex unlocking, we can move it out of the loop. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
39d7c4fcc3fa767be499d5fcc5a54e296ea2dd1f |
|
01-May-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
frag_deflate_thread: Move mutex unlock back to before queue put Originally the mutex unlock was before the queue_put to the writer thread. This ensured in rare cases where the queue was full (writer thread cannot keep up), the thread would not go to sleep holding the mutex, making other threads block waiting on the mutex (and in-directly on the write thread). This was changed when adding the pthread_cancel_{push/pop} calls. Restore original behaviour. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
45702011b2732166c88b2f52546c87c5953945ee |
|
30-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: change the index used when adding fragments to the writer cache Distinguish fragment blocks from file blocks in the writer cache on lookup by using negative indexes for fragments. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
316ab63e3361639621b90a02bbb31d30990dbb63 |
|
29-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
caches-queues-lists: get rid of "keep" blocks and make behaviour more explicit Originally the caches in mksquashfs were "buffer pools" that expanded as necessary when readahead/number of buffers in flight increased, and shrank as the number of buffers in flight decreased. It was realised that the "buffer pools" could also be used to lookup blocks in duplicate checking. Firstly, when the fragment/blocks of the file being duplicate checked were "still in flight" it was faster to look them up in the "buffer pool" rather than have to wait for the blocks to be written to disk (as was originally necessary because blocks in flight were inaccessible). Secondly, when blocks were given back to the "buffer pool", if rather than shrinking the cache, the blocks were put onto a freelist, duplicate checking might find the blocks there which is faster than having to read them back from the output filesystem. From this evolved the concept of "keep" blocks, which when a block was obtained from the cache via cache_get() if the keep flag was set this signified that the block was to be kept when released via cache_put(). This was perfectly adequate until now when code is being added to monitor/record cache behaviour. As the keep flag is a per block flag there is no cache specific information that indicates whether a cache is being used as a non-shrinking lookup cache or as shrinking non-lookup based "cache" (in this case it is really acting as a buffer pool). This is important because it turns out the statistics to be gathered differs depending on the cache usage. A non-shrinking lookup cache has count which represents the maximum size the cache has grown to, and used which represents the size of the cache currently in use. A shrinking non-lookup cache on the other hand shrinks as blocks become unused, and so count and used are one and the same. Given this there is no way of determining what the maximum size the shrinking cache has historically grown to using just count and used; used is completely redundant, and the maximum historical size is not recorded. So as first step, rearchitect the "keep" code moving the flag from being a per block flag to being a per cache flag, making it explicit whether the cache is being used as a non-shrinking lookup cache or as a shrinking non-lookup based cache. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e3ef7b81ce21d8da7007daeac4c351d2c2c11f9d |
|
27-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
info: add code to dump cache state Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
7538d74f6fbefc11f20fe33ab75d5f197b2dee5c |
|
22-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
info: add initial code to dump queue state when sent SIGHUP Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
569a9632abcc49db34a55593a8208e8dd2f68ffb |
|
22-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
progressbar: move progress bar state to progressbar.c and set via function At the moment the progress_enabled flag is set in progressbar.c if the progressbar should be enabled via enable_progress_bar() and disabled via disable_progress_bar(). However, this does not allow for temporary disabling of the progress bar. A {disable/enable}_progress_bar() sequence will enable the progress bar even if it was never enabled in the first place. Solve this by moving the overall progress flag (which determines if the progress bar should be initially enabled) into progressbar.c and set via the accessor function set_progressbar_state(). Now enable_progress_bar() only sets progress_enabled if the overall display_progress_bar flag is set. In effect progress_enabled becomes a temporary status flag controlled by the overall display_progress_bar flag. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
989f5fefff0f3427dfe65fa54018743ce48fc57d |
|
22-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add a comment regarding the progressbar and SQUASHFS_TRACE Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0d67c9dbeb007fa2c71f3f2846c3cf0fb799caf1 |
|
19-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
restore: move extern definition into restore.h Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1bbd0ccafd7b957856b640fed9e7c0d025723c10 |
|
19-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
read_fs: move extern definitions into read_fs.h Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
690d91306e8b20400ae8c36fd558604189b70bdc |
|
18-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
Swap source and destination in macros in disk -> host reading code Many years ago when Squashfs used bitfields the copying swap macros relied on s(source) (the first parameter) to be a pointer to the appropriate structure type. When swapping from the host order to disk order, source was a pointer to the appropriate type, and destination was an unaligned pointer. However, when swapping from disk order to host order in code that read from disk, it was the destination that was a pointer to the appropriate type, and source was an unaligned pointer. To accomodate this, the sense of the parameters was swapped, so the destination pointer was given first, and then the source pointer. This was a fairly horrible hack. Now that the rewritten swap macros no longer require either the source or destination pointer to be of the appropriate type, we can swap the parameters around in the disk -> host reading code, so that all code uses source then destination order. Note: the Unsquashfs code that reads legacy 1.x, 2.x and 3.x filesystems still uses the original bitfield swapping macros, and the requirement that the first parameter is of the appropriate type remains, this could be changed too (as there's no longer any code which uses the macros to swap from host -> disk order) but the swapping code is fossilised and in deep maintenance mode, and only essential changes are made. This largely cosmetic change (especially as the code isn't developed anymore and so any additional swapping macros is unlikely) isn't considered sufficiently essential to risk adding inadvertant bugs. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3e4fc4b01b11b00501a4c657aaf3175f461b19ce |
|
15-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
sort: move extern definitions to sort.h from mksquashfs.c Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c97dac5d763d3947b2370b8186611fa655864fcc |
|
14-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
queues-caches-lists: move cache freelist allocate logic into here, and make it per a per cache option. On appending we want to change the allocate logic for the fragment and writer caches to be grow first, rather than allocate from the free list first. This is because on appending with the use free list first logic the caches never grow very large leading to reduced cache effectiveness. By making it a per cache option we fix the issue that on appending we also made the reader cache grow first. This was *not* a major problem except because we never do lookup on the reader cache we don't need to do it! This commit is mainly because it always should have been a cache private variable rather than a global. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
7ffdf2a24b1871d251b7e97b1c8492375fc2b19d |
|
14-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
caches-queues-lists: move definitions of {insert|remove}_fragment_list from mksquashfs.c to here. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
71f3964ce67bf6c9eb4816872cd5db1d69d8cf28 |
|
09-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move the caches, queues and lists implementations to a separate file, and out of mksquashfs.c. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
83b8f8656426d466193e190367396ec444195a5f |
|
09-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: disable info printing once once file processing has stopped Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2e9fab1041946145d933badd220b4628b43eb1bd |
|
09-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
info: add info.h and move extern definitions to it. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
cf135d3bdf6081c79012f33ac74e917c55ee09bb |
|
08-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix recursive restore failure check Fix recursive failure in restoring check by moving it to prep_exit() and from restorefs(), this is because due to the changes where all restoring is now done on the restore thread, restorefs() is no longer recursively called, only prep_exit() is now recursively called. Whilst doing this, take advantage of the situation where restoring is now only done on the restore thread to fix a theorectical race condition with the previous code. The previous code identified recursive failure by incrementing the restoring flag every time it was called, if the restore flag increased beyond one then we had recursion, unfortunately this did not handle the case where two or more threads simultaneously entered the restoring code but before restoring took place, each thread would increment the flag making it look like recursive restoring had taken place. The new code fixes this by checking if the restore thread has entered prep_exit(), if it has then we have recursive failure. This is a much more specific check which allows multiple threads to fail and enter the restore code simultaneously. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9bfa0b8fbd4bcda25ee62d882e8087388c0a869d |
|
06-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: simplify pthread_cleanup_pop handling If exiting via EXIT_MKSQUASHFS(), BAD_ERROR() or MEM_ERROR() we do not need to explicitly execute the pthread_cleanup_pop handler because these macros terminate the thread via pthread_exit, which executes all pthread_cleanup handlers itself. If we're not restoring, we simply exit the process, which is fine. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1837bf160999869e94849a543a335a4756109003 |
|
06-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add FATAL ERROR to error message Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9f9cf79bb61b36d39f10bc3a62143e2613ec4afa |
|
06-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Don't explicitly signal SIGUSR1 anymore If the writer() thread hits an unrecoverable error then exit via EXIT_MKSQUASHFS rather than explicitly raising SIGUSR1, as EXIT_MKSQUASHFS now does the right thing (it itself raises SIGUSR1 and kills the calling thread if apppending, or just exits itself if not appending). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9e07191eea895a129cd89d19c2011f700263bb04 |
|
02-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: make EXIT_MKSQUASHFS() etc restore via the restore thread Since parallelisation only the main thread has been able to call the EXIT_MKSQUASHFS macros, the sub-threads have not been able to because the exit macros used to do a longjmp on restore which is only valid on the main thread. Unfortunately there are instances where the sub-threads do execute code which call the exit macros, these are usually (but not exclusively) in code which is mostly called by the main thread. If these exit macros ever triggered on the sub-threads then it wouldn't have worked. Removing these exit macros was by and large difficult because they are needed for the main thread. But now there exists a restore thread, it is easy to change the exit macros to signal the restore thread and then to exit the calling thread. This works for the main thread and the sub-threads, meaning the exit macros can now be used anywhere and by any thread. This removes the constant need when writing code to check what threads will be calling it, and of course it fixes the existing bugs. The other upshot of this change is all restoring is now done via the restore thread. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ee8e6386de7771a4f8bbfd75a8c7b07f6bd9fb5e |
|
01-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: don't now need to check if progress bar is enabled first before calling disable_progress_bar() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0f1d5a0a39901a4f966367ed8d7dbe725f395dad |
|
01-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: use pthread_exit(NULL) in writer thread rather than return NULL Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3a2d6113ce74988a477ec30f3c74bfc39025cc2f |
|
01-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: don't zero thread[x] on thread exit or check for it This is now unnecessary using pthread_cancel()/pthread_join() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
dd343397f3f8e85fe992748031dcc0090ba9e28d |
|
01-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Shift SIGUSR2 to SIGUSR1 now SIGUSR1 isn't used Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ee52aad80660844c57e8449aa7b8d9b007a8ef23 |
|
01-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: get rid of sigusr1_handler Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f9291aa5f178fce9af9575900e489c41a4f4a030 |
|
01-Apr-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: get rid of waitforthread() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fd74d9a0d6ff68aad5ca3bffa0c30ec29e09328d |
|
31-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Use pthread_cancel() to terminate sub-threads Use pthread_cancel() to terminate sub-threads when restoring filesystem rather than using pthread_kill(). Using pthread_cancel() is safer and better because it only cancels threads at specific cancellation points, rather than pthread_kill() which asynchronously interrupts threads. However, pthread_cancel() requires all code which uses mutexes to register and unregister cleanup code to ensure on pthread cancellation mutexes are properly released, otherwise code will deadlock (e.g. pthread_cond_wait() is a cancellation point, but it exits with the mutex held, and so the thread dies holding the lock). So also add all the necessary pthread cleaup handlers as well. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b8ec5205a5c1e57f4ec73423d6b3dc2763d3a027 |
|
28-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: rename sighandler2 to sighandler Sighandler no longer exisits so rename sighandler2. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a709bffbaba7f61e78a3c8294405c5d5540c7e0b |
|
28-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Add separate restore thread rather than setjmp/longjmp When ^C is hit twice (or on error) Mksquashfs if it is appending to a filesystem needs to exit restoring the filesystem to its original state. Originally when Mksquashfs was a single threaded application this meant the single thread had to unwind back to a known state and then restore. This was achieved by the use of setjmp/longjmp. When multi-threading was added to Mksquashfs this approach was retained but with the addition of code to disable the sub-threads before restoring took place. This was an acceptable solution but slightly inelegant because multi-threading meant unwinding of a single thread was no longer necessary. This commit removes the use of setjmp/longjmp and instead delegates restoring to a separate thread which when ^C is hit twice or unrecoverable error is encountered by a sub-thread (sending SIGUSR2), kills the main thread and does the restoring itself. Note, when the main thread receives an unrecoverable error, the new code still executes the recovery on the main thread but now without any unwinding. In this situation unwinding was never necessary, but it was easier with the original code to use share the code and unwind. Now unwinding is not needed anywhere, it is easier to share the code and not unwind. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8cb420a1a7f9ceba9cfedc7ff17b8ce6418b1e2e |
|
26-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move installation of SIGUSR1 handler to each thread rather than installing it before thread creation and having the created sub-threads inherit it. This is because the main thread, the progress bar and the info thread should not have a SIGUSR1 handler. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8f8d275816dd91f35f89cde37241f40fedbc6c7c |
|
26-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: change sigprocmask to pthread_sigmask Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3c83829de866fd63371948f9ff77831be3f19ff2 |
|
26-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: get rid of pthread_setcancel{state!type} Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d6b1f0dc41e935f2c03893f7024c72743f87c6d7 |
|
26-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move filesystem table writing into own function and out of the main() function. This will allow a dedicated filesystem restore thread to call it, if the appended to filesystem needs restoring. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
24551a8a473d7edb1835eb0f7dcf6e07e3a9d2e1 |
|
24-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: print file being squashed when ^\ (SIGQUIT) typed If ^\ is typed on the keyboard whilst Mksquashfs is squashing files (progress bar being printed), then display the filename of the file being squashed. The progress bar is useful to display how far blockwise/percentage-wise Mksquashfs has got, but, it doesn't display filenames, and it is often nice to get a snapshot filewise where Mksquashfs has got to. Obviously, you can use -info for this, but this is a "heavy-weight" option which displays every filename, it not only leads to screenfulls of text, but it also can slow Mksquashfs down as it is bottlenecked by all the filename printing. Adding the ^\ option offers a best of both worlds, Mksquashfs displays the progress bar which gives nice feedback on the progress of Mksquashfs but in a way which does not generate lots of text and doesn't slow Mksquashfs down, and typing ^\ gives you the filename of file being squashed but only when desired, which doesn't generate screenfulls of text or slow Mksquashfs down. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9391cb14eaac4972d5432b44aa2635c0f10165f8 |
|
20-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: tidy up signal handling and document the signal usage Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
54e655acfe27608ff23dd985a6f7a7e61156b367 |
|
19-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: get rid of update_progress_bar() Don't display the progress bar every time a file is written as the background 1/4 second display is sufficient. Removing this eliminates an unanticipated main thread dependency on the progress bar thread. By grabbing the progress_mutex mutex before doing the pthread_cond_signal() to wake up the progress bar thread it means the main thread waits on the progress_mutex mutex if the progress bar thread already has it grabbed. Normally when the progress bar wakes up it grabs the progress_mutex mutex prints the progress bar and quickly releases the mutex, and so the main thread will never wait on the mutex. However, if the progress bar printing is slow, the main thread can wake up the progress bar thread when a file is written, and it can still be printing the progress bar when the main thread writes the next file, causing the main thread to wait. In effect this throttles file writing to the speed of the progress bar printing, normally this has no effect because progress bar printing is faster, however, if the output terminal is running over a slow link this can become a bottleneck. The author has noticed this running Mksquashfs on a VT102 connected via a 9600 baud serial line. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e187beaec0595ba323ea5dbadda390786403d539 |
|
14-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
read_xattrs: Use error.h for read_xattrs as well and get rid of the separate error macro implementations in read_xattrs. This finally unifies all the error handling into error.h Read_xattrs.c has for a long time been an annoying special case because it is used by both Mksquashfs and Unsquashfs, it couldn't use the error.h infrastructure used by Mksquashfs because that pulled in dependencies on Mksquashfs that don't exist in Unsquashs, and it couldn't use the unsquashfs.h infrastructure used by Unsquashfs because that pulled in dependencies on Unsquashfs that don't exist in Mksquashfs, and so it had to define its own macros. But this has meant it has not benefited from the improvements in error handling added to the Mksquashfs/Unsquashfs error infrastructure. The previous commits have finally broken the conflicting dependencies introduced by error.h, unnecessary dependencies have been removed and both Mksquashfs and Unsquashfs now provide the necessary functions used by error.h... So we can finally drop the read_xattrs.c only error macro implemenation :-) Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9a0e8bb0899e0971fe1d81b7d8b83d2a21701b2b |
|
10-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
error: move extern definitions to error.h from progressbar.h Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9b7c3c2fa85f7002ca5a5335ab7c3dab4b136573 |
|
10-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
error: rename prep_exit_mksquashfs to just prep_exit() and remove the superfluous exit() in prep_exit(), exit() should be via the macros that call prep_exit(). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
477f433f1400177aca8aa8658bd2df1bf15dd1ca |
|
06-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Add ERRORs for read_fs_bytes() failure in recovery file If read_fs_bytes() fails in recovery file saving or restoring then print an ERROR saying the filesystem is corrupted. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9451938650abe45e8714660f420c0546ccb7a6aa |
|
06-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Add ERRORs if read_fs_bytes() fails in duplicate checking Add some ERRORs if read_fs_bytes() fails when trying to read back datablocks or fragments from the output filesystem when checking for duplicates. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
21d5dc4d4a942158e2c1995e13faa220bd5b9a9f |
|
01-Mar-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: update date Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3bcf67d13d0a7a09e4aabee60599931d23df5657 |
|
24-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
xattrs: save_xattrs() no longer returns failure Now MEM_ERROR deals with out of memory, save_xattrs() no longer needs to return failure. Remove failure return and checks for failure. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
19b877db49fcda2f8b7e94a9ae482e98b445308d |
|
23-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
sort: Generate_file_priorities() no longer needs to return error Now that add_priority_list() does not return error there is no need to return error status from generate_file_priorities(). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ec71c3c5d49701ab723ac75ba8d0d277ecdb2ae3 |
|
21-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Use MEM_ERROR() for out of space handling. Replace all hand crafted BAD_ERROR() messages with MEM_ERROR() which does the same thing. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e9df455d4bef7b29ed7fb1c4c676a3e80a81d438 |
|
15-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Rewrite write failure error message in writer thread Write_bytes() already prints an error message if write() fails, so this error message is largely redundant. So replace with a more user friendly error message that says we're aborting due to failure to write the filesystem image. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e8b536f85b8fd33a647e9f25e3185e909571b6b3 |
|
12-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Rewrite write failure error message in write_destination() Write_bytes() already prints an error message if write() fails, so this error message is largely redundant. So replace with a more user friendly error message that says we're aborting due to failure to write the filesystem image. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a0c234697fb99b14183062dba9f080fc277cd488 |
|
12-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: flag lseek error in write_destination as probable out of space If the main thread hits "lseek error" when writing the metadata in write_destination() it is probably because the destination file is out of space, this is especially true if the destination is a block device, but could conceivably happen on some (non Linux?) filesystems too if they don't implement holes. This is because lseeking to the write position could be beyond the end of the available destination file end, and hence fail before attempting to write. Recent correspondence with users shows that "Lseek error" is meaningless, and so augment the error message with an "Out of Space" error which is presumbly something they will understand. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3f4ccd2521c318f99fd66c96fe58ba47a67c1123 |
|
11-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: flag lseek error in writer as probable out of space If the writer thread hits "lseek error" it is probably because the destination file is out of space, this is especially true if the destination is a block device, but could conceivably happen on some (non Linux?) filesystems too if they don't implement holes. This is because lseeking to the write position could be beyond the end of the available destination file end, and hence fail before attempting to write. Recent correspondence with users shows that "Lseek error" is meaningless, and so augment the error message with an "Out of Space" error which is presumbly something they will understand. Note we can't use BAD_ERROR here because it will cause mksquashfs to immediately exit, and we instead want to signal the the main thread to exit. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d2ffa3c3f3bfd1e454622b762d7959ff136bd481 |
|
11-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: improve out of space in output filesystem handling There has been a long term problem with out of space handling in mksquashfs, dating back to the parallelisation of mksquashfs in 2006. The writer thread discovers out of space when writing the filesystem, but, it cannot tell the main thread to abort, as there is no "back channel" to the main thread. Adding a back channel wasn't an attractive option because checking of this by the main thread would limit parallelisation, and I was keen on maxmising parallelism. In the end I implemented a workaround where the writer() thread flaged the error, ignored further write requests, and at the end of the filesystem creation when the main thread had to synchronise with the writer thread, it passed an error flag back, which would cause the main thread to abort then. This workaround was determined to be "good enough" for the first release of "parallel mksquashfs" when as usual due to work commitments I needed to finish the difficult and complex task of parallelising Mksquashfs by a fixed deadline. This was encouraged by the view that nobody knowingly creates Squashfs filesystems on a device insufficiently large, and if it does prove too small, it is likely to be towards the end of filesystem creation, and so no-one would notice Mksquashfs running on until the end of the filesystem creation.... So it proved to be, no-one raised issues about the out of space handling, and although the out of space handling was never entirely forgotten about, it was never re-visited as there was always something more important to deal with, and the years went by ... Fast-forward to 2013, and I get some emails about "Lseek failure" on the destination device. Although it's not been conclusively proved because the reporter has not got back to me, it is almost certainly a subtle case of the "out of space" handling. The reporter is confused as there's been no "out of space" error reported, and I was confused for a while until I realised the "out of space" error has likely scrolled off the screen - the source filesystem is huge, the destination filesystem is far too small, and by the time the "Lseek error" is reported the out of space error is long gone. The "Lseek error" is a symptom of the earlier "out of space" error where the writer thread has ceased to write data to the output filesystem - when the main thread finds a "potential" duplicate file alread stored in the filesystem, it reads the original file out of the filesystem for a byte-by-byte compare, but the file doesn't exist as it would have been written after the "out of space" error, and on a block device this will result in an "Lseek error". So, the out of space handling finally causes an issue seven years afterwards. Revisiting the problem the solution is obvious, have the writer thread send a signal to the main process, the main process on receipt of the signal aborts and restores the filesystem if it is appending. In fact the infrastructure already exists to deal with the user hitting ^C twice. This commit fixes that. The next commit will fix a subtle edge condition with the writer thread where it may experience Lseek error before hitting Out of Space on block devices. This is already handled, but it is not flagged as an Out of Space error. This could be the Lseek error reported but it is unlikely, as the Lseek error is reported as immediately terminating Mksquashfs, if the writer thread experienced Lseek Mksquashfs would in fact continue. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d23000c93903a378e4c3bbfd0c2ced4d02a89fcd |
|
06-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Improve writer lseek error message Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1d3177a71362295c54e9bfebc57ce8b85be395b9 |
|
06-Feb-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Improve lseek error messages Add description to determine which function the lseek error occurred in, and add the offset the lseek was trying to seek to. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
19de5b6abef46b03d7952cabce845517fd71d1ba |
|
13-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: ensure buffer_list is always initialised in write_file_blocks_dup() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
38cb1ab1cf5e39b85a30b65d26d1a01cd839e5c2 |
|
13-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: ensure block_list is always initialised in write_file_blocks_dup() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2760d8228a2bcc6e50f2850d2faa2254b9904b0c |
|
13-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: ensure block_list is always initialised in write_file_blocks() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
15e6b9cc731e92620594e9de7b0db4de30fdf4cf |
|
13-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
action: fix memory leak in move_dir() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
651d68dd33b0a41c03ea0b95ff1b2b5fbbe95500 |
|
13-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: optimise subpathname() calling in dir_scan1() Small optimisation - subpath is only needed if there are exclude actions specified, or if the dir_ent is a directory. In other cases don't calculate subpath as it is not needed. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
04ef244ff47ead370d0bc4b6f37b48e456c2f498 |
|
09-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: rewrite some ugly code in scan1_opendir() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3cb5d6c0b2043427fdf673b5ed6dc29b8d9579f9 |
|
09-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Move strdupping of filename/subpath to scan1_opendir() This simplifies the logic, eliminating the need to strdup on the recursive call to dir_scan1(), and eliminating the need to free them on recursive dir_scan1() failure. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
87db567b4f7d7733369df99fd51593d3e7b9de6b |
|
09-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: eliminate redundant label Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b2abb1c98972386ad4647dbbe4b9abecf983de69 |
|
09-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: optimise excluded() when dealing with non-anchored excludes Non anchored excludes (specified with the "... name" syntax to exclude files matching name in any directory) are implemented with the "stickypath" path variable. This is an exclude specification which "sticks" as it is present in every directory. This was previously implemented by adding the stickypath to each new set of paths returned from the excluded() function, as obviously, we want stickypath to be present in the next sub-directory. However, this has the undesirable effect that the new paths variable "new" is always returned holding at least one entry (the stickypath). This partially breaks the original design intention of excluded() where by putting the exclude specifications only in the directories where they are applicable, for the majority of the time dir_scan1() will have an empty set of paths to check for exclude matches, thus eliminating the overhead of exclude matching. Fix this by not implementing stickypaths as an entry added to the new set of paths returned from excluded(), instead explictly match against stickypath if it exists. This slightly complicates excluded() requiring a new helper function excluded_match() split out of excluded(), but the benefit is the new variable in the majority of cases now gets returned empty (NULL) for stickypaths which was the original intention. Also get rid of init_subdir() and instead initialise new in add_subdir() when first called. This not only eliminates code (so the overall changes are 15 lines shorter than before despite the addition of the new excluded_match() helper function) but it also means "new" is never allocated in the event we don't get any matches. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
205c1e0995564aa344a63f6a1ff1feae12dedd27 |
|
07-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix "new" variable leak in dir_scan1() Fix leak in dir_scan1() where new returned by excluded() was not freed. Normally new will be null unless exclude files and wildcards have been used. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a105f9b4c0e9ef779b3a3ce565ddabf5a6119436 |
|
07-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Wrap line longer than 80 chars Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1153279b6d3c096b26190b303f4abd845456aa84 |
|
04-Jan-2013 |
Phillip Lougher <phillip@squashfs.org.uk> |
action: add quoted string and back slash handling to lexical analyser Add the ability to parse strings quoted with ", and also add the ability to backslash "special characters" that would normally be treated as end of string. Quoted and non quoted strings can be specified multiply and the strings will be concatenated together. String examples "Hello World" Hello\ World This" is a "string "So"\ is\ "this" "This \" is too" etc. Also switch to using an internal buffer (increased as necessary) to return strings from the lexical analyser, rather than dynamically allocating each string returned. This reduces unnecessary overhead (mostly strings returned from the lexical analyser are discarded without being stored, the ones that are stored can be explicitly copied when necessary), and it fixes a memory leak in the parser as returned strings are not freed. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c8e7648be036ae006a320177dee22ca8c0db7945 |
|
31-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
pseudo: Get rid of ERROR statements in child process in exec_file() ERROR() since commit 738570df60f65c10cd7fde4134f3af1e005b671a calls progressbar_error() to synchronise with the progress bar output, however, this function uses pthread mutexes which are meaningless/ useless in a child process. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e1668fe88f5d8da2799a9fcf86a1a6b1e38479dd |
|
30-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: check for integer overflow in user input Check for integer overflow in values derived from user input. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1bfe70795da28679fcb5305da586ce6d8118d6bb |
|
28-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
Unsquashfs: don't treat unrecognised xattr prefixes as xattr read failure There are two users for get_xattr(), Mksquashfs uses it to read the xattrs from the filesystem on appending, and Unsquashfs uses it to retrieve the xattrs for writing to disk. Unfortunately, the two users disagree on what to do with unknown xattr prefixes, Mksquashfs wants to treat this as fatal otherwise this will cause xattrs to be be lost on appending. Unsquashfs on the otherhand should want to retrieve the xattrs which are known and to ignore the rest, this allows Unsquashfs to cope more gracefully with future versions which may have unknown xattrs, as long as the general xattr structure is adhered to, Unsquashfs should be able to safely ignore unknown xattrs, and to write the ones it knows about, this is better than completely refusing to retrieve all the xattrs. So add ignore parameter. If ignore is TRUE then don't treat unknown xattr prefixes as a failure to read the xattr. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d2f045f17270c6c02bff2ce5238e3d6f3829fafe |
|
28-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix fragment struct leak in write_file_{process|blocks|frag} Fix small leak in write_file_process() write_file_blocks() and write_file_frag() if -no-duplicates option is specified on command line. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2302f6951e2a7e314e67b97ad0280203c389fc61 |
|
27-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix fclose leak in reader_read_file() on I/O error Reader_read_file() did not close the file if I/O error occurred when file reading. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b73cabaa0c7097c1b51a600bce0eb9c0f1128e29 |
|
24-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add action file support Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5ef2eba370311345600a0609175f08973e7510a0 |
|
24-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
pseudo: Move pseudo variable from mksquashfs.c to pseudo.c Move and make pseudo variable mostly private to pseudo. This eliminates the need to pass it to and from read_pseudo_def() and read_pseudo_file(). It is now only needed for dir_scan2() and so add an accessor get_pseudo() for it in pseudo.c. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
83847c1beb852a7b3f5906a0f4c90be659e46794 |
|
23-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs/unsquashfs/pseudo/sort: Fix ERROR statement Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fe2c735274e81fcfa92b62c4837d473d9f76dee6 |
|
23-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Add MAX_LINE definition rather than using bare constants. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
59ff862cc048d240530af6467ab66c94532e1629 |
|
23-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
pseudo: handle filenames with spaces in pseudo file definitions Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
09b269ae68dcc1ce96b8d17cf8a09a2b0dfcbf2a |
|
22-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
Fix some limits in the file parsing routines Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b22336d29731b277d4b2f156174f4aaa799fa36b |
|
20-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Rewrite exclude file processing The previous version suffered from a number of nasty problems. 1. It couldn't handle exclude files starting with one or more newlines. 2. It couldn't handle filenames starting with one or more spaces. 3. If a line exceeded the line limit (16384 bytes), the line would be silently truncated. 4. If file reading failed for any other reason than EOF this was not reported. Fix these issues, and also add support for comment lines (prefixed by #). Files starting with spaces or # can be escaped by \, i.e. \#filename or \ filename Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
386128f3ea4b2a6428f7d719d843753ad734ae70 |
|
16-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquasfs: move extract file processing into separate function Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fe58b497d33a24358b4a961dc16f07ed0a921b5d |
|
15-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Add missing carriage returns to some ERROR statements Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f8259677dfa1f5cf9ce492d7ef3a40ae9d7ab051 |
|
12-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: mark temporary filename allocated on stack as overflow safe fscanf() is limited to reading a maximum of 16384 bytes plus the terminating '\0' into filename allocated on the stack. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1df6c11264573bc6982a2c02358cdce3b6eade40 |
|
12-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: mark temporary symlink buffers on stack as overflow safe Mark these buffers as overflow safe, as readlink() is limited to reading a maximum of 65536 bytes. Note: readlink() does not append a terminating '\0' and so it is OK to allocate 65536 bytes and read a maximum of 65536 bytes in readlink(). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3f81a7746f574cf931c6b413d56893e0d3659a71 |
|
04-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: dynamically allocate b_buffer in getbase() rather than allocating it on the stack. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f968be8a214eb999a70bf7a730e751d806e407f8 |
|
04-Dec-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix bug in check for trailing junk after k/K/m/M Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
62859d215e7f828ace8501f5863f0c3d8b48ebf3 |
|
30-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
Mark temporary strings on stack used by regerror as overflow safe Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
91459c1854c4f5ba57e9561cbfe2b0ff6097c8c8 |
|
30-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: dynamically allocate path in display_path2() rather than allocating it on the stack. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
38a35ec949c9b97f788eb7933587807739c1edd6 |
|
30-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix dir_scan() exit if lstat of source directory fails If the source directory has disappeared between scanning it and generating the filesystem, then abort. Previously, in the very unlikely event this check triggered, dir_scan() would return silently having generated no filesystem. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
dcb5af9f8bc255b85fb508fff2e873d595311f4d |
|
30-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: dynamically allocate filename in old_add_exclude() rather than allocating it on the stack. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
66f7bfde6fdfe89dd43af0b8e396068774e6861f |
|
30-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquasfs: check return value of fstat() in reader_read_file() for error Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f4f4838c8ebcbeedc49fa9c10e2eec5b08d30c5a |
|
29-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: parse_number(), add additional comment re strtol {under/over}flow Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
da96f5b723b3a1fa81f030706c85e40e27213ae7 |
|
28-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: parse_number(), rename arg and b to be more self-documenting Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a9e656329c6205b7ce11b4a3486ac1dd3d395210 |
|
28-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: check for trailing junk after k/K/m/M Tighten up parsing for -b block number. Originally Mksquashfs deliberately didn't check for trailing junk after the k/K/m/M as this allowed things such as 1Mbyte to be parsed. However, this means rubbish such as 1mjjjsjdlj is parsed as OK. Given the whole point of the current exercise is to tighten up {un/mk}squasfs' detection of bogus user input after CVEs were raised against it, it seems silly to keep this feature. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ed3456947e38a752b03bcb71b88fbe427f5f6d7c |
|
28-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Check for number before k/K/m/M quantity Tighten up parsing for -b block number Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
94c1fe06b86139ef6ec435688c5d2096bc2f333e |
|
28-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add parse_number() helper for numeric command line options Replace separate strtol() calls with a new helper for the -processors, -read-queue, -write-queue and -fragment-queue options which adds checks for int overflow. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8e44e053452bbcbab528a2a711ffdd0fef70a870 |
|
26-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix potential stack overflow in get_component() This fix is similar to the fix for CVE-2012-4024 raised against unsquashfs, except mksquashfs was not covered by CVE-2012-4024 Fix potential stack overflow in get_component() where an individual pathname component in an exclude file (specified on the command line or in an exclude file) could exceed the 1024 byte sized targname allocated on the stack. Fix by dynamically allocating targname rather than storing it as a fixed size on the stack. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5ef5169f7a7a3e467f43481204d3dc6a78c4a021 |
|
19-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: dynamically allocate buffer in pathname() and reallocate it if the pathname exceeds the currently allocated size. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d457ed3015f61944686f029725745362b7080949 |
|
19-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: dynamically allocate buffer in subpathname() and reallocate it if the subpathname exceeds the currently allocated size. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e4ff36a6bb3ea8f81bb6a6f5042c5d50ff0b2be1 |
|
19-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix indenting in dir_scan1() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e69b588e418ab9b48bb3098757e62c2d375aeaf7 |
|
19-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix dir_scan5() All dir_scan4 routines were bumped to dir_scan5 to make way for a new dir_scan4() which processed the prune (empty) action. However one call was not updated ... Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
15e8f047a3634cc0d2b80b80cce55648c54bb859 |
|
16-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: restructure and fix dir_scan4() routine Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
af4c923f2287669599c68cf92ed7c4107f9f378e |
|
15-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: dynamically allocate recovery_file Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
eb69dad8c6e6019691d433c1b8c0cbf5b67f3ee5 |
|
15-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashs: add comment for dir_scan5() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
71ae14e514db2389e4b185e6aec1614818609570 |
|
15-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Skip dir_scan4() if there's no empty actions Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e92cb5142923bda522a24a158d8c440a26188b5a |
|
15-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Skip dir_scan3() if there's no move actions Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f3d0f9ce04599ce69e85e0e11cb04890cf51841a |
|
14-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Skip dir_scan2() if there's no actions or pseudo files Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
dc587a0d50b155bce06da6e5a53601bacea1c1c2 |
|
14-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: make pseudo non global Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2abfcf71616474710ed7b6f97cdad97d6adeec0d |
|
11-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move empty action processing from dir_scan1() Move empty action processing into a new dir_scan4() ran after move action and pseudo file processing. This is necessary because these actions can affect whether directories are empty. Obviously the move action can populate previously empty directories, and it can also make directories empty, and pseudo files can also populate previously empty directories. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e8630bee0a7c00992542291b5c6563809ce6b0a7 |
|
11-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs improve comment on dir_scan1 routines Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a81a83190da0667e78d774cefc4b1151e2de9ace |
|
02-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
Get rid of obsolete CVS tag in mksquashfs/unsquashfs version Replace with git. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c130532147e3d40bdd0edea20a4e496badd8a127 |
|
02-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix "mksquashfs: move list allocation from off the stack" Fix Wednesday's cb541a10c2fce3e2b66f97c83701c906400d231a commit, now list is malloced sizeof(list) does not return the list size. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
83d42a3fc898962aa1f1e8387f2ccb1114e0d294 |
|
01-Nov-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
Update email address Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d4e78ee8c1bda273e636c7f4050918e845b72c93 |
|
31-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move list allocation from off the stack Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
162c24c46c51cf5bd73a59067832fb2fc4226b0b |
|
30-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix stack overflow in write_fragment_table() Elso Andras has reported a SegV in mksquashfs squashing a 100 GB filesystem with 5 million files. The SegV turns out to be a stack overflow in write_fragment_table() where it is allocating a temporary copy of the fragment_table on the stack, this is generally not a good idea as the fragment table can be very large. This bug is easily fixed. Since moving to a fixed little endian layout without bitfields, allocating a temporary copy is no longer necessary because any swapping (mksquashfs running on a big-endian architecture) can now be done inplace. This code should have been updated to do this back in 2009, but the code somehow didn't get updated. Thanks to Elso Andras for reporting this bug, and for unusually providing sufficient debug information in the bug report that it could be tracked down without any folllow up emails! Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9523b04f5f7205fc2daa3a014a2aa5242123ab92 |
|
27-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add "-a" as a short option for "-action" Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2477d0defc9d6dade582bb36596eed2e3cfddf8c |
|
24-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
error.h: consolidate the various error macros into one header file This eliminates the multiple separate implementations and brings all the files into line with respect to synchronising with the progress bar and exiting squashfs calling prep_exit_mksquashfs(). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
838d29600cde4d3a0f4060757faa0259746fd13f |
|
23-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Make EXIT_MKSQUASHFS available to actions code On fatal error (malloc failure etc.) the actions code needs to gracefully exit mksquashfs, deleting the output file, and more importantly restoring the filesystem if appending. Move the functionality of EXIT_MKSQUASHFS into a new function prep_exit_mksquashfs(), which can be called by the actions code. Up till now code outside mksquashfs.c has either been able to exit directly (because it has been executing before such cleanup is necessary), or it has been convenient to pass such fatal errors back up to the mksquashfs.c based calling function.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c6c73b2d2fa6538f4c630a911008a5c6d5263919 |
|
19-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Add -progress to force progress bar display when using -info Add -progress option to enable progress bar display when using -info option. Originally when the progress bar was introduced in mksquashfs 3.2, it was always displayed, even with the -info option. To disable the progress bar you had to specify -no-progress. This although logically correct, seemed counter-intuitive as in the majority of cases you didn't want the progress bar displayed with -info. So, in mksquashfs 3.4 -info was changed to disable the progress bar by default. Unfortunately, a by-product of this change was to make it impossible to have both the progress bar displayed and -info output in the rare cases where it is desirable (sometimes you want to both see where mksquashfs has got to in the source directories being Squashed, and where that is/mksquashfs is in the overall Squashfs filesystem creation). So finally, after over 4 years, add back in the ability to display both the progress bar and -info output. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
6d6fd8c6c238121e7e6299c99ba608488348ff12 |
|
19-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs/sort: Fix INFO() so that it is synchronised with the progress bar Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3b89ee8f79141ded7929145981c26362eeef2a26 |
|
19-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Split progress bar out into separate files Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9f920f6d8698ecc622f98048c666f90fcf3dac96 |
|
16-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Get rid of progress bar enabled check in TRACE statement If tracing is enabled, then the progress bar is always disabled. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
23d8362e9e35a564182c713640fa04f31e9c08fb |
|
14-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add move() action Add move action allowing files and directories to be moved and/or renamed. Syntax -action "move(DEST)@<test_ops>" Semantics are the same as Unix mv command. Rename SOURCE to DEST (if it doesn't exist) or Move SOURCE to DEST (if it exists and is a directory) SOURCE is any file matching the test_ops expression. For instance -action "move(/source)@name(*.[ch])" move all *.[ch] files to the directory "/source" More complex combinations of test_ops are supported by default. For instance Move all files not owned by monitor smaller than 1024 bytes to "/smallfiles" but ignore any files matching "*.[ch]" -action "move(/smallfiles)@ !uid(monitor) && size(-1024) && !name(*.[ch])" Multiple moves are evaluated "simultaneously", so the results of one move do not affect other moves. This is to prevent unanticipated side-effect. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
24eeb77f45a77d5233cebd60c2b634abd1982ab3 |
|
13-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
pseudo: remove redundant depth parameter in dir_scan2() Depth can be obtained from dir. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5d57929acbd10068b0a4479e4099c10ecd1133f3 |
|
13-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
pseudo: fix handling of directory pseudo files Fix bug where directories created by pseudo directory files did not have subpath correctly set. This meant subpathname() would not return the correct pathname, with the effect that -info and the action tests pathname() and subpathname() were broken. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d0fe1d508d6247a0f470ef82d84a740d7a470336 |
|
09-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix root dir_ent naming root dir_ent should be unamed ("") and not pathname. This enables pathname("/") and subpathname("/") to match on the root directory. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
90e0825107e81a0ec37769f52c5dade7082746ce |
|
05-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: make subpathname() return a leading "/" Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0a6708802331f739cbcaff8310fac3ebf89b5340 |
|
05-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: get rid of redundant inode_info in dir_scan4() Only used in next line, get rid of it and use dir_ent->inode directly Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0366aec4699484c6dde4cc2f722af5f6c3c75ab5 |
|
05-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: get rid of redundant dir_name in dir_scan4() With the fix of the -info output lines to use subpathname(), there is now only one use of dir_name. Get rid of it and use dir_ent->name directly. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4980d7f9864ee13581a3199108b7a8a1f90bb40a |
|
05-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix -info to use subpathname() Now we have subpathname() that represents the pathname of the file from the point of view of the output Squashfs filesystem (rather than pathname(), which represents the pathname in the source filesystem), use that in preference to pathname(). In the future with the move action, which can rename and move files around, this is necessary because the output should reflect the results of any move actions. Additionally, irrespective of the new move action, subpathname() was always a better choice than pathname(), but until recently it didn't exist, and so couldn't be used. Also fix the numerous -info outputs which incorrectly just output the name of the file rather than the full pathname. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d6577809294e4c3f49f6d9be69644c9fe89559a7 |
|
04-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: optimise lookup_inode2() for dirs Don't do the look-up for directories because we don't hard-link directories. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
eb92b191727c8344fb28c656b24325a363506ef2 |
|
01-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquasfs: fix free_dir_entry Now that create_dir_entry isn't being called with source_name == name, remove the check for that in free_dir_entry. Also tidy code by removing the unnecessary != NULL check for name. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c73ed3266dca619b2271c3f0c13e2a2d3387ee46 |
|
01-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix assignment of source_name Normally create_dir_entry will be called with source_name == NULL if the file has not been renamed. If the file has been renamed, create_dir_entry will be called with name holding the new name, and source_name holding the original_name. This commit fixes the callers which in the case where the file has not been renamed, call create_dir_entry with source_name == name, leading to source_name being != NULL when the file has not been renamed. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9e2f1237e5f3d1c7321393ea4499324ecd29b1d8 |
|
01-Oct-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix subpathname() so it doesn't use source_name Source_name stores the original name of the file if it has been renamed and it is needed by pathname() when accessing the file. Subpathname() on the other hand should return the pathname() of the file in the Squashfs filesystem after renaming and moving. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1eae83d9ffcb33104442d7693a6519303c5d1855 |
|
26-Sep-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: fix root parent inode computation and action depth() test The previous commit added the ability to execute actions on the root inode ("/"), however, it introduces a couple of subtle bugs. These bugs are caused by the change to create_dir_entry() where the root dir_ent's parent directory is changed from NULL to the root directory, creating the situation where the parent of the root directory is itself. This change was ultimately because the action code relies on the parent directory not being NULL (previously the action code was not executed on the root dir_ent and so the parent was never NULL). This, however, introduces the following two subtle bugs: 1. Root parent inode number computation is broken get_parent_no() returns the parent inode number for a directory when this directory inode is being added to the inode table. get_parent_no() relies on the special case that the parent is NULL to detect when it is dealing with the root directory inode. As the root parent is now itself, we effectively end up with ".." and "." in the root directory having the same inode number, which is obviously wrong. Due to the way mount works, the parent directory ("..") of a mounted filesystem is the parent of the mount point (as you would expect), and so this bug is largely hidden, however, the readir() system call directly queries the filesystem, and this does return ".." and "." as having the same inode number % myls . . 961 .. 961 .git 1 0001-Apply-actions-to-the-root-directory.patch 826 2. The depth() operation tests the depth of a particular file or directory, files in the root directory have depth 1, files in immediate subdirectories have depth 2 and so on. Making the parent of the root dir_ent be the root introduces the suble bug that the root inode will be incorrectly considered to be at depth 1, when it should be at depth 0. The correct solution is to add a dummy parent dir_info at depth 0, and to check for that in get_parent_no(). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3f31dcf1c85c847a2967f855c2c458a11c202740 |
|
22-Sep-2012 |
Andy Lutomirski <luto@amacapital.net> |
actions: Apply actions to the root directory Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
242242e36f98b2107946994c2bdbadfe010a6bf9 |
|
24-Aug-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Remove qsort and add a bottom up linked list merge sort Now that directory entries are stored in a linked list, rather than an array, move to using a bottom up linked list merge sort. Qsort and other O(n log n) algorithms work well with arrays but not linked lists. Merge sort another O(n log n) sort algorithm on the other hand is not ideal for arrays (as it needs an additional n storage locations as sorting is not done in place), but it is ideal for linked lists because it doesn't require any extra storage. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
bf33836421997fde91f7a0c775de11f55c41cb01 |
|
22-Aug-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Use a linked list to store directory entries rather than an array When scanning and storing the source directories use a linked list to store the directory entries rather than an array. This change is to more efficiently handle the empty action and the soon to be implemented move action. The empty action removes directory entries and the move action may move directory entries from one directory to another. These actions are rather messy to implement with arrays requiring any holes resulting from deleting/moving to be filled by shuffling array entries down to fill the hole. Linked lists allow entries to be deleted/moved much easier, which is not only a performance improvement but results in more aesthetically pleasing code. Arrays were previously used only because the qsort function requires arrays. The move to linked lists has improved the code and this is an additional unexpected bonus, which is in addition to the previously mentioned reasons to move to linked lists. Qsort is stil used in this commit, and so code has been added to convert the linked-list into an array before calling qsort, and code has also been added to convert the sorted array into a linked-list. This is messy, but only temporary, to ensure this commit doesn't break mksquashfs. The next commit will remove qsort and will instead add a merge sort which can efficiently sort linked lists ( O(n log n) which is the same complexity as qsort). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
539c2b1798ec742a89514909cb42740beb9480e1 |
|
30-Jul-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move inode_number allocation and sorting into a new scan routine Move inode_number allocation out of the first scan (dir_scan1), and directory sorting out of the second scan (dir_scan2). Move them into a new dir_scan3, and bump the existing dir_scan3 to dir_scan4. There are a couple of reasons for doing this: 1. It fixes the problem that inode_numbers were allocated in the order files were read from the source directories, which is often different to the order files appear in the final file system image after sorting (*) 2. Previously if a file was added in the first scan (i.e. not excluded), it was guaranteed to be present in the final file system image and to be at that place in the directory hierarchy, and so it made sense to allocate the inode number then (ignoring issue 1 above), but now with the empty action and the soon to be implemented move action, this no longer makes sense. 2.1. a directories can be deleted by the empty action after the first scan (**) 2.2. directories and files can be moved into different directories by the move action after the first scan, and inode numbers should be allocated based on where the files will be in the final file system image and not where they appeared in the source directories (another case of issue 1 above). (*) this is an aesthetic issue rather than one of correctness (the previous allocation was correct, but perhaps not as nice aesthetically). (**) putting the empty action in the first scan avoided the issue that inode_numbers were allocated in the first scan, but, it is broken. An empty directory in the first scan can be populated by pseudo files in the second scan, or by the move action. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
abc3b491e7c2f8638c07ee2a87cf8871194bd31c |
|
29-Jul-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: rearrange dir_scan* routines Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
53cef74f607c7e2e19206e1c68b25b0a00bfbb75 |
|
25-Jul-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: create inode_number() and parent_inode() Move code to get the inode_number and the parent inode_number into separate functions. This removes duplicate code and removes knowledge of the implementation out of the caller functions. It is also the first stage in changing how and when the inode numbers are computed. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
81204c26e8242b1d50f03b948801673a7e0f1c66 |
|
25-Jul-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Create new lookup_inode2() Move setting of pseudo and pseudo_id into lookup_inode() rather than requiring callers to set them if necessary. Add these as parameters to lookup_inode() and rename to lookup_inode2(). This cleans up the code in the callers of lookup_inode2(). Also add lookup_inode() as an inline wrapper to lookup_inode2() to avoid obfusticating existing callers of lookup_inode(). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
aeb8d3d2c666aabe7523a7ef28df2e53bb5f7b64 |
|
11-Jul-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
action: fix subpathname to work as expected Previously subpathname relied on not using FNM_PATHNAME in fnmatch to obtain a subpathname match by utilising the behaviour that "*" could match "/" and so ensuring a pathname pattern would match pathnames "underneath" the directories directly matched by the pathname pattern. i.e. a pattern match of "a/b/*" will match "a/b/c", but it will also match "a/b/c/d", the "*" matching the "c/d" component of the pathname. This provided the intended semantics of "subpathname", that any file/directory which is a subpath of the pattern will match. This fulfils the requirement of various actions where we often only want the action to have effect on files/directories contained within a particular directory (or directories if wildcards have been used in the pattern match). It, however, has an unwanted and unexpected side-effect, given the pathname pattern "a/*/c/*" the user might expect it to only match on directories called "c" which are children of *one* unknown directory which is a child of directory "a", but in fact because "*" matches on "/" too, the pathname "a/b/extra-directory/c/filename" will match. This is considered broken behaviour, and so subpathname has been reimplemented to walk the pattern match, and to only apply the patten match to the appropriate leading part of pathname, ensuring pathnames which are subpaths match while allowing FNM_PATHNAME to be used in fnmatch ensuring the unexpected behaviour detailed above does not occur. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ba9f9310a52fdfc51f2fd7ee252889182ec9a348 |
|
01-Mar-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add new file() test operation Add a new file() test operation which runs "file" against the filename. File() takes one argument, a regular expression pattern which is matched against the output from the file command. If the regular expression matches file() returns true. Substring matches are supported. e.g. file(text) will match on any output containing text, for example the string "ACSII C program text" received from running file against a c source code file. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b4f4b0d5d06c3c502e6379e832d0a042234b3c7d |
|
20-Feb-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: Add pathname to struct action_data Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
aadd318a769a049703cf2ff2ce78e5b2b5d594c0 |
|
19-Feb-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: allow () to be omitted on test operations with no args Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b2e9a40fc8c4fa55bba05cdffe577c1d29d54d3c |
|
19-Feb-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: fix memory leak when pruning empty sub directory When pruning the empty sub directory we should free it, and the strdup'ed file and subpath variables. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
10a4b57df0eda4b5160bfd8b23dea30fabac3240 |
|
19-Feb-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add free_dir_entry function Add free_dir_entry() function which deals with feeeing name and source_name Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b38c172137d7eed57a0f8d1af69eb65aaecd8916 |
|
10-Feb-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add subpath to dir_info structure Rather than pathname which includes the path specified on the command line, add a subpath which is rooted at the root of the squashfs filesystem being created. i.e. given mksquashfs a/b file.sqsh with file "c/d/e" inside directory "b" the pathname of "d" will be "a/b/c/d" this adds a subpath which will be "c/d" This is necessary for the new pathname test for actions. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
494479fd097eaab956dda035c45efadc151cadc0 |
|
03-Feb-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: optimise dir_ent structure by removing pathname member All dir_ent structures stored both the name and pathname of each file scanned from the source directories. This was rather wasteful of memory, as the majority of pathnames could be computed from the parent directory's pathname and the dir_ent's name. Exceptions to this are names which have had a _1, _2 etc. appended due to name clashes, pseudo files and cases where multiple directories and files have been specified on the mksquashfs command line, in which case the root directory will likely consist of entries each with a different pathname. These cases have to be handled specially, either with the new source_name member holding the original name, or in the cases where there's a completely different pathname, by the use of the nonstandard_pathname member. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
43cc428243312c39d63c32647e37b35dd448fa9e |
|
25-Jan-2012 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add subpathname test operation Similar to pathname except it matches on partial pathnames, i.e. "*/c/d" will match "a/b/c/d" as well as "b/c/d". Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
94b51f0a4cd4b8c7b14e64d3b147016952680d6e |
|
31-Dec-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: implement xxxx_range versions of test operations Implement range versions of filesize, dirsize, size, inode, nlink, fileblocks, dirblocks, blocks, gid, uid and depth. These allow for a range [x, y] to be checked (value is between x and y inclusive), rather than a single value (equal to, less than or greater than). Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
7022870b7819011aa54595fbb5f602f1d1ede1e4 |
|
31-Dec-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add "all", "source" and "excluded" options to empty action Add options to empty action which allow you to specify which kind of empty directories to work on: "source", only work on directories which were empty in the source filesystem, i.e. ignore directories which have become empty only due to excluded files. "excluded", only work on directories which are empty due to one or more files being excluded, i.e. ignore directories which were empty in the source filesystem. no argument, or "all" argument, work on all empty directories irrespective of why they're empty.. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ad0f92110583675fb115b0f0a5a3155e91aa903c |
|
31-Dec-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Count the number of excluded files in each directory This allows you to distinguish between directories originally empty, or directories empty due to files being excluded. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
6a78a2da7a14515dda5c0901332eabb9143fe68a |
|
28-Dec-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add empty action Exclude the directory if it is empty, and the expression returns true. This action is added to deal with situations where excluding results in empty directories (including situations where a directory may contain other directories but whuch recursively are ultimately empty). These directories once the contents have been excluded are often completely useless and should be excluded themselves. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8519a6fdfc8c9d63626691aadaf2419cad90affc |
|
25-Dec-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add depth test operation Add depth test operation, this takes one argument, with an optional - or +, If no +-, returns true if directory depth is equal to argument If +, returns true if directory depth is greater than argument If -, returns true if directory depth is less than argument Top level directory has depth of 1 Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0b5a1248da1478368e3ba669fea05c1ea5e927fd |
|
25-Dec-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: track directory depth Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ded70faa107b43caadc6b01dbfe1e86a61b7b9f8 |
|
25-Dec-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: tidy some code Remove horrible dangling "= 0". Two extra lines but much neater. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ac46233cdc1e18db597fdd6fb2743f0ab10894c0 |
|
23-Dec-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add file type test operation Takes one arg, the type to test each file against. The arg is a single character, comprising f - regular file d - directory l - symbolic link b - block device c - character device s - socket p - fifo Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
00c17515dd002b421de82ba39316bca1f97b3645 |
|
12-Nov-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: implement "X" symbolic mode of mode action Last symbolic permission implemented. "X" is something Ive never actually used, but, which ought to be there for completeness and for compatibility with chmod. It also has to be dealt with as a slightly irritating special case :-) Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5c97a9e1b5f445a833898bb57d3767e3a276ea7d |
|
07-Nov-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: implement "st" symbolic modes of mode action Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
696aace2d3dc3e1900428cd5f1ac7158925787c7 |
|
25-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add chmod action data structure for sym modes Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
89d757c5ac7c97e52791e147407cfee458e69673 |
|
20-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add file types operated on to actions Actions (apart from exclude actions) only operated on regular files, this was wrong. Actions now specify which file types are applicable. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8aaf41fe98ac2ef4217544ec3b47e6627b465c83 |
|
19-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: extend action framework to have action run functions These are functions which are executed if the expression matches for a file. This allows the specialised eval actions functions to be replaced by a generic function, with the action specific code moved into the action run functions for each action as necessary. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c14fc85d20dbc4651ce626976528ae7aab761212 |
|
12-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add uid and gid actions These actions allow users to over-ride the global behaviour on a per inode basis. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
84bf788a088dae22019a6c3038f33f0e5c3d2307 |
|
10-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add compressed and uncompressed actions These actions allow users to over-ride the global behaviour on a per inode basis. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
63f531f11ecd5ed3c3a1a9b354a8555d0e180bb3 |
|
10-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Make noD and noF inode specific This allows them to be changed by actions on an inode specific basis. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
488543801e06fb9f0926ba23d12240dd941e71ad |
|
09-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquasfs: handle empty files specially in deflator() Add special case for empty files in the deflator thread, without this they're handled differently depending on whether the sparse files flag is set, the fragment flag is set, or whether they fall through to be considered as a block to be compressed by the deflator thread. In all cases the end result is the same (an empty file is handled specially in the write_file() routine irrespective of whether it has been handled as a sparse file of zero bytes, a fragment of zero bytes, or a data block of zero bytes in the deflator thread), but it is messy that they're handled differently depending on filesystem flags. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2504b08f197d975d4b42945f13ae157c575dc84a |
|
07-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: move fragment flag setting code into is_fragment() Move duplicate separate implementations of fragment flag setting code in reader_read_file() and read_read_process() into single is_fragment() function. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a3d8b364f7b407fe099800737cb0d49a8a861011 |
|
05-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
actions: add fragments and no-fragments actions These actions allow users to over-ride the global behaviour on a per inode basis. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9b6e3416e7e61df3cf1114a0d374198aab53b5c7 |
|
05-Sep-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: Make no_fragments and always_use_fragments inode specific This allows them to be changed by actions on an inode specific basis. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fe30cc641d8625b3b9401a0c5d752458617af1c9 |
|
29-Aug-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
squashfs: rationalise struct file_buffer Convert some flags from int to char, and reorganise removing padding, on 64-bit architectures the structure should be reduced by 20 bytes from 112 to 92. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
10d8de07c15fb3f3ada7bf0b782acd491987ef7d |
|
29-Aug-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add exclude action Add an additional action called exclude, which takes no parameters. Any files which the expression returns TRUE will be excluded. Curently, the only test operator is name(wildcard), which matches on the file name (leaf name without preceeding pathname). So, currently the functionality is equivalent to non-anchored excludes i.e. -action exclude=name(*.o) is equivalent to -e "... *.o". Do we really want yet another exclude facility? Well no if it remains equivalent to just anchored excludes, but once all the anticipated test operators are implemented then it becomes much more powerful than the existing functionality. Want to exclude based on file age, size or ownership etc.? That will be possible soon. The cool thing is the action infrastructure is shared with all other actions, and the exclude infrastructure is already there and "comes free", and so the exclude action code is minimal about 20 lines! Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4bcb7f87d69edc99adce34232f7cb9dea84ab923 |
|
28-Aug-2011 |
Phillip Lougher <phillip@squashfs.org.uk> |
mksquashfs: add action support Add intial action support. Currently, there's supported: - One action fragment() - One test name() Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b9508be392464efb4b71e21bf12a052224d7fe94 |
|
13-Jun-2011 |
Phillip Lougher <phillip@lougher.demon.co.uk> |
mksquashfs: move fragment index allocation to fragment creation Move allocation of the fragment index to when a new empty fragment is obtained, rather than when the filled fragment is queued to the fragment_deflate threads. Doing this allows multiple fragments to be open, and being filled at the same time, the choice of which fragment is to be used for a particular file-tail depending on various attributes. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
04b7b535c1ccd6b78d5368df030271b80d414574 |
|
11-Jun-2011 |
Phillip Lougher <phillip@lougher.demon.co.uk> |
mksquashfs: pass fragment_data to write_fragment() Pass fragment_data to write_fragment() rather than access global variable. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ed88a8d93aa04e6aa2cec9d118161edcee1c87f9 |
|
10-Jun-2011 |
Phillip Lougher <phillip@lougher.demon.co.uk> |
mksquashfs: remove redundant global variable fragment_size Fragment_data has a size field, use this instead. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0d3bad2f4d40cfca04d3b4c38cc6920dde8aae91 |
|
13-Apr-2011 |
Phillip Lougher <phillip@lougher.demon.co.uk> |
compressors: mksquashfs/unsquashfs broken if GZIP_SUPPORT is not defined Fix mistake in gzip_comp_ops structure used when no GZIP_SUPPORT is defined. The missing NULLs in the structure caused mksquashfs/unsquashfs to believe no compressors were present. While fixing this also make the long sequence of NULLs unnecessary by rearranging the structure. This ensures that this bug should not arise in the future as the unsupported compressor structures now don't need to be updated every time the number of compressor functions are changed. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d56f6723626a391b473c2c023b628abcd8ed31e3 |
|
28-Feb-2011 |
Phillip Lougher <phillip@lougher.demon.co.uk> |
squashfs-tools 4.2 release Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
39c2b484186d266a8d589d6f79f6b472b7e9c8c2 |
|
28-Feb-2011 |
Phillip Lougher <phillip@lougher.demon.co.uk> |
xz_wrapper: check comp opts structure read from file system for correctness When passed a comp opts structure read from the file system check it is the expected length. Also check dictionary size is valid. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
78a0cc601b205513111a672b2ca98447d96bd228 |
|
20-Feb-2011 |
Phillip Lougher <phillip@lougher.demon.co.uk> |
Update version date and copyright date Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a45c9d2b6df15a359591717b71d948040efb6cd4 |
|
20-Feb-2011 |
Phillip Lougher <phillip@lougher.demon.co.uk> |
Improve and tidy up comp_opts dictionary setting code in xz_wrapper.c. Fix the following bugs: 1. metadata dictionary size should always be SQUASHFS_METADATA_SIZE, the previous code incorrectly set metadata dictionary size to 4K for 4K block file systems. 2. when appending to file systems, filter_count in xz_extract_options() wasn't correctly recomputed based on the number of filters in the existing file system. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
bf1ad241aee59b57cbb19e80171c147c88f825fd |
|
31-Dec-2010 |
plougher <plougher> |
Update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f25a97dc4ba98debc223096be21d6624ae59063e |
|
31-Dec-2010 |
plougher <plougher> |
get rid of global.h include
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
64e83fda63a1b8408ffbfa466e6c67b0de7a8c99 |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_super_block typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
857d0ddc3c94dc889d7dad55f9651963ab5a4ed9 |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_base_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9b393553bbca1d7efc755a4b73e64407a526ef11 |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_dir_entry typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2611d39a5fcea87d4d5160d3d9bfe1c6aa92729c |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_ldir_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9d80a6074011ca775b99c2ca2466ef077f6d1157 |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_dir_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5ae6e956cc5d10aee13744cef8c0caa4208a169e |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_symlink_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1e6ac4a05f89feba7b41571ef0936aa1a3d445df |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_lreg_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8701ed64d3241ac3c86db2b6e303769450eac867 |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_reg_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0b4ee5b4b390a9c2c92dfaa3eec9bdee1182e061 |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_ldev_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c70c63397c3d8117c9f24ec29fa52ba401ea1608 |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_dev_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
aa0d122348bd8ec500bee33654caf5f34f6644d6 |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_lipc_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e56b9862d07a7c6202090d74b86d28639ede52ca |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_ipc_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2bd2b72b3de5817f9b16e6677a02c217363136f6 |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_dir_index typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
520e1a144c9a6c957754f93dc8830f884fe5669b |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_dir_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8ed84b96ca36da8147993935b951918359d8f20a |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_fragment_entry typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8973a12943b86e759a6391995271fa620d73483f |
|
31-Dec-2010 |
plougher <plougher> |
get rid of squashfs_inode_header typedef
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
29e2ace8ae504f27181953c6d429a8b9a57aa755 |
|
31-Dec-2010 |
plougher <plougher> |
Make write_destination() take a void * and remove unnecessary casts
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c2a5ae1f2ce9f57e99eafafd6e92984c57a83902 |
|
31-Dec-2010 |
plougher <plougher> |
Get rid of redundant (void *) cast
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5d4bbf4f4e54e63d7febbd0ebefbe099b65c430a |
|
31-Dec-2010 |
plougher <plougher> |
Remove duplicate definition (defined in mksquashfs.h)
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
94770e8996ac1ad7eaa0d632afef4f4e651c50ef |
|
31-Dec-2010 |
plougher <plougher> |
Update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b48442b2e37b3cb7efbffb032968f115eec7963c |
|
31-Dec-2010 |
plougher <plougher> |
Use compressor_uncompress()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
bfb876cd3596caaa6382148d2031bd25a23d24d5 |
|
31-Dec-2010 |
plougher <plougher> |
Use new compressor_compress() wrapper
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3d1b382e659a8d33988e111748f12f6b78aee3bb |
|
30-Dec-2010 |
plougher <plougher> |
Update date.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8e4dad4e4102b8babe9d446416f6079c245519a6 |
|
28-Dec-2010 |
plougher <plougher> |
Fix writing of compressor option data to file system
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
978f5887de3a04399454a3892050b6c392e317c7 |
|
28-Dec-2010 |
plougher <plougher> |
Get rid of s_minor variable - hasn't been needed since 3.x
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
7fd1fe971d2642d3fa657cbdcd4c62ac988a95d3 |
|
28-Dec-2010 |
plougher <plougher> |
Remove free of data returned by compressor_dump_options. It is more convenient for the data returned by xz_dump_options to be statically allocated. This may obviously change when more compressor dump_options functions are written, but anything which makes it more convenient to pass back malloced data can be dealt with then.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
871c72ac11b15938c3ccf13fb6f191dd2fe55bac |
|
25-Dec-2010 |
plougher <plougher> |
Add comments
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b747f4fd3c6f0ac40fbda9e491cce260f3a3bead |
|
25-Dec-2010 |
plougher <plougher> |
Add call to compressor_options_post() enabling compressors to validate options after all options have been processed.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3d7e518f58f2ac19b2f535cbb29530738d4fadb7 |
|
25-Dec-2010 |
plougher <plougher> |
Add Mksquashfs support for reading compressor specific options from the compressor, and to write these to the filesystem, setting the COMP_OPT flag
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
87a2621a2c0bb9be76f73d687fe5ccc5541b49f0 |
|
20-Dec-2010 |
plougher <plougher> |
Update dates.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9e9d9dcb50314c8db76326092796d134707adbe3 |
|
18-Dec-2010 |
plougher <plougher> |
Move recoverfd, fd and metadata assignment out of ifs in read_recovery_data()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1b879bcc8061c999aaf1865fb9cf4668e97b6eac |
|
18-Dec-2010 |
plougher <plougher> |
Move metadata assignment out of if in write_recovery_data()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
dec6ef13470be0566f54a6d65088034883375343 |
|
18-Dec-2010 |
plougher <plougher> |
Move paths assignment out of if in add_path()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f2d2a84f74d99888f60edb8f5a4cd49a8f5df772 |
|
18-Dec-2010 |
plougher <plougher> |
Move thread assignment out of if in initialise_threads()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
360b6e410d52685e2ed3e21d8fd49a9562c55222 |
|
18-Dec-2010 |
plougher <plougher> |
Move dir assignment out of if in dir_scan1()i, and move some variables into nested scope
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2e3bcbe3c5388a6cad82462477bd16114f589a5b |
|
18-Dec-2010 |
plougher <plougher> |
Move dir_ent assignment out of if in dir_scan()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
480d9bfe6900f09baeaac57828162e1bac0ff714 |
|
18-Dec-2010 |
plougher <plougher> |
Join definition of d_name with readdir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
66578ced586f662828f4c3d210d87ee3e2308682 |
|
16-Dec-2010 |
plougher <plougher> |
Move d_name assignment out of if in scan1_readdir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4925e1726dc836d817fad456a605666c43f11efc |
|
16-Dec-2010 |
plougher <plougher> |
Move pass into nested scope in scan1_single_readdir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1fae42cd22535b0e3b7c94029ed1a1a94682cb69 |
|
16-Dec-2010 |
plougher <plougher> |
Move n and pass definitions into nested scope in scan1_encomp_readdir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
11266baa1477d84e6606c0e1cbd555ab8e38e821 |
|
16-Dec-2010 |
plougher <plougher> |
Move i definition into nested scope in scan1_encomp_readdir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
89fe2c7a3e51fe51da8b010e6bd490a7325d1216 |
|
16-Dec-2010 |
plougher <plougher> |
Move basename definition into nested scope in scan1_encomp_readdir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b4116c33f0ac088088a47232404b8d5ef4d84d19 |
|
16-Dec-2010 |
plougher <plougher> |
Move basename assignment out of if in scan1_encomp_dir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
6da792b2c817abc26c8cf1c6812b9bceec391f55 |
|
16-Dec-2010 |
plougher <plougher> |
Move dir assignment out of if in scan1_opendir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e5dad79eb55048c8a2cf60b8f2054ebb3113ae10 |
|
16-Dec-2010 |
plougher <plougher> |
Move dir->list[dir->count] assignment out of if in add_dir_entry()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
288f6857fb07fc63e15d9794925ef97ea9f6f25b |
|
16-Dec-2010 |
plougher <plougher> |
Move inode assignment out of if lookup_inode()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
87139623fefc0eda9dc24d6163450af292b63474 |
|
16-Dec-2010 |
plougher <plougher> |
Move block_list assignment out of if in write_file_blocks()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c1d258e14913d1653dac40031ce2cc3298d0ceb8 |
|
16-Dec-2010 |
plougher <plougher> |
Move file assignment out of if in reader_read_file()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
51ef9ae2bc04edc69ed8475fbcbddc2182a94159 |
|
16-Dec-2010 |
plougher <plougher> |
Move dupl_ptr assignment out of if in add_non_dup()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3bb279ca67aee2507e9b321677d2d83875331fb5 |
|
16-Dec-2010 |
plougher <plougher> |
Move frg assignment out of if in add_file()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e7e6e838add1be2ee12b0534fb613cae0ca36e9d |
|
16-Dec-2010 |
plougher <plougher> |
Move ffrg assignment out of if in get_and_fill_fragment()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e8b26f6a049d75421b150ee1071099b5c93c8e2d |
|
16-Dec-2010 |
plougher <plougher> |
Wrap line in write_dir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4627ca3de2adb53a586ed8ebeb517060ffa89f10 |
|
16-Dec-2010 |
plougher <plougher> |
Remove unnecessary braces in write_dir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
43d490818ea94ada9981f80c2724a27021f98210 |
|
16-Dec-2010 |
plougher <plougher> |
Move size assignment out of if in add_dir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3bfd71e16d7051f6aa12a8f89e1281bac1cea6e0 |
|
16-Dec-2010 |
plougher <plougher> |
Move dir->buff assignment out of if in scan3_init_dir()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
df2b9aa1f70cb2b2a4890efd6e63b1b4d9941364 |
|
16-Dec-2010 |
plougher <plougher> |
Move byte assignment out of if in SQUASHFS_LSYMLINK_TYPE create_inode()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5cf38b8bf1614a4c871e40fe5be3f32089a308f0 |
|
16-Dec-2010 |
plougher <plougher> |
Move byte assignment out of if in SQUASHFS_SYMLINK_TYPE create_inode()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0d55d9ebc21863017bae85c32f287f8e6466b761 |
|
16-Dec-2010 |
plougher <plougher> |
Move queue->data assignment out of if in queue_init()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
afae82580caf4f8fce2bab48c4d4d9b79a5c01f5 |
|
15-Dec-2010 |
plougher <plougher> |
Set no_xattrs flag in filesystem, and set it from the filesystem when appending.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
89c7a5110040ebf2539bbf80640c93ea19370cf7 |
|
15-Dec-2010 |
plougher <plougher> |
Set nox compression flag in filesystem, and set it from the filesystem when appending.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f236a213c5adfa92bfc7efbabf4deb9e2d30cb73 |
|
08-Dec-2010 |
plougher <plougher> |
Update date.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4fb6682abfcabcc17995856d71c95fa985c3ac44 |
|
08-Dec-2010 |
plougher <plougher> |
Display compressor specific option usage
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a2f9796066f55a41ef8a5eccc71254ebc8d40b28 |
|
04-Dec-2010 |
plougher <plougher> |
Update date.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d886567331690a0781c695a590e43ac37b78ad10 |
|
27-Nov-2010 |
plougher <plougher> |
Don't print unrecognised compression option if the problem was a bad or missing compression option parameter (on a recognised compression option).
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
13fdddf1f4681ad3cff19b97f42d821c70db15ba |
|
24-Nov-2010 |
plougher <plougher> |
Add calls to compressor_init() now that this has been moved out of compress().
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c5d5987b8ae30bf30164be5bf268b06438b66af0 |
|
22-Nov-2010 |
plougher <plougher> |
Make sure -comp isn't specified _after_ any -X options
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b5576ea04fa803c17ecb5f4c3ffba30a9c2a10e8 |
|
22-Nov-2010 |
plougher <plougher> |
Move -X args processing closer to -comp option processing
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5c2adafac023909de9e910647ca5fa7511b6d667 |
|
22-Nov-2010 |
plougher <plougher> |
Get rid of comp_name
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4da4bd4fd48c3b092962b58133c09ba8effcfcab |
|
21-Nov-2010 |
plougher <plougher> |
Add support for compressor specific options (specified by -Xxxxx).
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8bc376ba1f7110fb88989e5134b74aa8412fb00e |
|
12-Nov-2010 |
plougher <plougher> |
Fix "fagment" typos
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
613d8c73becfc485e9df870798fa861bf2d5724f |
|
17-Sep-2010 |
plougher <plougher> |
Hopefully these really are the release versions
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
dcd66c5ab95d194493b99d1f5b8f6cf76f75d920 |
|
17-Sep-2010 |
plougher <plougher> |
Fix bug in pseudo modify file handling.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
146dede8f538c73a958a43250d401a5c6ad735a4 |
|
16-Sep-2010 |
plougher <plougher> |
Mksquashfs, new release
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8144e254cf875c82c425eeb59e2464ff08606210 |
|
15-Sep-2010 |
plougher <plougher> |
Update dates
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5741d796c336281f47c4db0986760955c5bf9483 |
|
04-Sep-2010 |
plougher <plougher> |
Move cache size computation to initialise_threads where it is first used. This allows two of the cache size variables to be made local to initialise_threads rather than being globals, as they're only now used by initialise_threads.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
11fbbfefc1e9f048c6c19e18eb61ab92e5c418fa |
|
29-Aug-2010 |
plougher <plougher> |
update dates
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
07d25c26a72a970eee2484f6d5433e38502ec04e |
|
25-Aug-2010 |
plougher <plougher> |
Change detect to the somewhat better store
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8bf692c218a67658ec9564509f62358c2a4fc85d |
|
25-Aug-2010 |
plougher <plougher> |
Update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
30281c806322f6c50568013d8dd64c1818b9515d |
|
25-Aug-2010 |
plougher <plougher> |
Make the default behaviour of Mksquashfs with respect to storing xattrs (-no-xattr option set or unset) a build time option. Also add an extra -xattr option to Mksquashfs for use where the build time default is not to store xattrs. If XATTR support is disabled at build time (XATTR_SUPPRT commented out), then make the default behaviour of Mksquashfs to not extract xattrs, and show the -xattr option as unsupported in the help message.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9cc26b77a61fefdeb45f5c487c2bfdefd394b66f |
|
17-Aug-2010 |
plougher <plougher> |
uclibc does not have get_nprocs()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5b290d25b02ccbd0a4056b301a0e4edac4802d89 |
|
13-Aug-2010 |
plougher <plougher> |
Fix typos in comment
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
875bfef1a2ca92603767c0b0a81fb5226ceb9cc5 |
|
13-Aug-2010 |
plougher <plougher> |
Fix append exit on malloc/realloc failure.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a4c24ed16a81da29bac029920c3d6d3d66264ddd |
|
11-Aug-2010 |
plougher <plougher> |
In reader_read_file if the read returns error immediately fail rather than restating and trying again. Also add a couple of comments.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1e380705d0ad81050afa8045109136b8597949a5 |
|
11-Aug-2010 |
plougher <plougher> |
Restructure error handling in reader_read_file making it cleaner
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a0a49c3dc37883bc09ccc941c6da471ec184d888 |
|
11-Aug-2010 |
plougher <plougher> |
Make generic_write_table take void * rather than char *
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
860c1f3d8aa4ba40d587382a91821bea03b023c5 |
|
11-Aug-2010 |
plougher <plougher> |
Make XATTR support conditionally compilable. This is to support platforms and c libraries that lack xattr support.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
14dd5f34a5d4445783e792c461923b0768c3fbb0 |
|
02-Aug-2010 |
plougher <plougher> |
Change memcpy to memmove. If an inode is large (>16K) it will cause the src and dest pointers to overlap in the data cache memcpy, potentially leading to block_list corruption/truncation. This code dates back to Mksquashfs v1.0 (2002) where inodes were not very large, inodes can now be considerably larger and this latent bug should have been fixed. Given the nature of the bug it surprising it hasn't caused any issues until now.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
afd3e0ec674cd031ebefeea0bfafc6df1fd925be |
|
02-Aug-2010 |
plougher <plougher> |
Update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1e4dbce16f38ee8a689c1744c11843b6fc2c1b07 |
|
31-Jul-2010 |
plougher <plougher> |
Mark the dummy top-level directory (created when multiple sources are on the command line or -keep-as-directory is set) as a PSEUDO file to indicate it doesn't really exist. This fixes the llistxattr failure occasionally seen.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
6f2a826d84a6f5f5e4154db79266a6d7d4d5e5e7 |
|
27-Jul-2010 |
plougher <plougher> |
Add missing checks for realloc failure
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
44f0328d7bfccb8f43e164a7bed9cb66071f690c |
|
27-Jul-2010 |
plougher <plougher> |
Ensure inode_lookup_table doesn't become NULL on realloc failure
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fa89c3372813f32c38f8604a619149d1a4319344 |
|
27-Jul-2010 |
plougher <plougher> |
Ensure fragment_table doesn't become NULL on realloc failure
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
17248ca21043d74cd84b8c3de4325ffa9b65bdfe |
|
27-Jul-2010 |
plougher <plougher> |
Fix realloc of inode and directory data caches so on realloc failure they don't become NULL.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
79d665a20268cc201722e9374614f25d854c1a06 |
|
27-Jul-2010 |
plougher <plougher> |
Assign directory_table realloc to a temporary variable, previously if a realloc failed directory_table will become NULL which isn't very clever when trying to restore the filesystem in appending.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1eb2a666d9e12ad3fb1ed609c98b6aa7f44b398c |
|
26-Jul-2010 |
plougher <plougher> |
When reallocing the inode_table don't assign the value to inode_table - if realloc fails inode_table will become NULL which isn't very useful when trying to restore the filesystem if appending.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1611145093b16af200d7f8fb4c6898c5327a827f |
|
22-Jul-2010 |
plougher <plougher> |
Wrap some lines and tidy macro formatting
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e1c9a748a98e75900a47e9b6be56c4a8f29d0fd4 |
|
21-Jul-2010 |
plougher <plougher> |
Pass malloc failure in add_sort_list correctly up to calling function in mksquashfs.c, rather than just ignoring it... Plus remove BAD_ERROR use in sort.c and pass that abort error condition up as well. BAD_ERROR in sort.c aborts without restoring the filesystem if appending which isn't a good idea...
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8d4404d1f63a558f4903eb8c939bd4306a805d0f |
|
21-Jul-2010 |
plougher <plougher> |
Update copyright
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1d1c6bbfeeb81076c10552b4eaa82ff0c3d8b406 |
|
21-Jul-2010 |
plougher <plougher> |
Pass malloc failure in add_priority_list up and deal wih it in dir_scan
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
332e43d3ae9db0be9e49b212b531c95106ea6ac5 |
|
21-Jul-2010 |
plougher <plougher> |
Abort on malloc failure when saving filesysten state on append.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d86ee82b358f3dba40a5d1f21e0860846248ff47 |
|
21-Jul-2010 |
plougher <plougher> |
Abort on malloc failure in init_subdir.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5c60eabe42b16ce3950c9483dd954d4e199295ef |
|
21-Jul-2010 |
plougher <plougher> |
Abort on malloc failure in add_path().
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fbfdda7673e7fa8fb0afbcfa06663c3ef267e57b |
|
21-Jul-2010 |
plougher <plougher> |
Make scan1_opendir abort on malloc failure.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b7a66810afa7a5eb2636e3564af56ec95606d19d |
|
21-Jul-2010 |
plougher <plougher> |
Make add_pending_frgment abort on malloc failure.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
cc6896db95231d922c8f6c55eead504bb1eb8ffd |
|
21-Jul-2010 |
plougher <plougher> |
Abort on malloc failure in cache_get() rather than returning NULL
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9ca649cc40fe311caf1fc5f66e01aa718cc20c20 |
|
21-Jul-2010 |
plougher <plougher> |
Abort on malloc failure in cache_init() rather than return NULL, which isn't checked.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ca61d1c9d4464ea2c9898eaad45eaada829a761c |
|
20-Jul-2010 |
plougher <plougher> |
queue_init() returning NULL not checked, however, returning NULL is unnecessary as the failure is fatal, so replace with an explicit abort...
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
10f7d571e635ce2f47a4eec3ae6d116e8f343577 |
|
20-Jul-2010 |
plougher <plougher> |
Fix total uncompressed bytes reported by mksquashfs to include the fragment, inode lookup and xattr id tables. Plus correctly compute the size of the id table (the existing code was based on the original separate uid and gid tables, with each id of size 2 bytes)... Happily as these tables are very small, the overall total bytes value reported was only slighly off.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
85c5626b7cdcc50d54dd062b3bbd60f0ae7c0fd3 |
|
20-Jul-2010 |
plougher <plougher> |
Export inode lookup table should depend on noI option
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3a4a1b30e2cd47d2890984e32f298e8ab2828838 |
|
20-Jul-2010 |
plougher <plougher> |
Id_table compression should depend on noI option
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
747e726886e0605225b8ea41185e059bc3e32eb7 |
|
19-Jul-2010 |
plougher <plougher> |
Total uncompressed filesystem size reported by mksquashfs didn't include uncompressed xattr data size.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fdee12aafc26ed50b57d42323a60e4547acb3bcc |
|
19-Jul-2010 |
plougher <plougher> |
Fix total uncompressed xattr data size reported by mksquashfs. Previously the reported size was computed *after* duplicate detection and prefix removal therefore underestimating the real size of the xattr data.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
21f63b355db9976b1ed0df3af5ee59cfd8875d1d |
|
18-Jul-2010 |
plougher <plougher> |
Restore xattrs in the event of an abort on appending.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3306cb2b54a60a32664617118336ac141e1471b6 |
|
18-Jun-2010 |
plougher <plougher> |
change read_fs_bytes() from taking char * to taking void *
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1d065e9f3c6d22a629134837a55538fb8619cfb4 |
|
18-Jun-2010 |
plougher <plougher> |
Rename read_destination() to read_fs_bytes(). Also don't abort on I/O error inside read_fs_bytes and instead correctly pass the error up to higher levels.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
570f436c85a99435180a3ec9aeb1c94135ab0e77 |
|
17-Jun-2010 |
plougher <plougher> |
Add support for reading xattrs in append
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ef3e8ec622df66f023f504d9653fff898c7258e7 |
|
19-May-2010 |
plougher <plougher> |
Update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
59dce676d40b7c9824b5d778125993fb6d3ee4cb |
|
19-May-2010 |
plougher <plougher> |
Change permissions of created output filesystem image file from -rwx------ to -rw-r--r--.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ce564c6a5d3524d75802f79361fc78f634821a89 |
|
19-May-2010 |
plougher <plougher> |
Add no-xattrs option
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
6d89ac274b1f73a49918d992ac3298decc063666 |
|
19-May-2010 |
plougher <plougher> |
*** empty log message ***
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b99d7831b7f0650dd41b393058e33d5c92f533b8 |
|
19-May-2010 |
plougher <plougher> |
Add noX option to specifiy that extended attributes should not be compressed
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c5d69328b23c606b3205f84ef0f01d45baa996a5 |
|
12-May-2010 |
plougher <plougher> |
xattrs, add support for ipc inodes (fifos and sockets)
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e6e0e1bdf98ad6faa63527e5bbdd3bd5e7e97a9e |
|
12-May-2010 |
plougher <plougher> |
Add support for xattrs. File system can store up to 2^48 compressed bytes of xattr data, and the number of xattrs per inode is unlimited. Each xattr value can be up to 4 Gbytes. Xattrs are supported for files, directories, device nodes and symbolic links.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b3977eb8ba88ea2f0b3b0d37be293240b07584d2 |
|
02-May-2010 |
plougher <plougher> |
Hide how pseudo files are marked as such in inode structure.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b85e9ad343d3ff4e2c9aaafcd73931aca321de7c |
|
02-May-2010 |
plougher <plougher> |
Add more information to pseudo_file flag, allowing both pseudo process files and other pseudo files to be identified.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f0dc2386d8b299d50c3ccc79326131c4f1c1c47a |
|
02-May-2010 |
plougher <plougher> |
Fix reporting of pseudo file error, where the file name aleady exists in the root directory of the file system being appended to. Previously the error message in this case incorrectly stated it could be excluded.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b087fc16fd6ac11779a37ec88432e1058758022b |
|
01-May-2010 |
plougher <plougher> |
dir_info->pathname no longer used once directory closed, so free it.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e4e92094a920c267a9f23df2534ec7af73a78adf |
|
01-May-2010 |
plougher <plougher> |
Fix pseudo dir printing with -info
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c1ace521485e6ea11501b6b6b5594e54f22115bc |
|
01-May-2010 |
plougher <plougher> |
Move inode type = file/lreg logic into create_inode()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3c6bdb5dd80ef181141ce39b72cd843524d071f0 |
|
01-May-2010 |
plougher <plougher> |
Move inode type is dir/ldir logic into create_inode()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f5456bd7c43f1da21d6206d0137a551f79627687 |
|
01-May-2010 |
plougher <plougher> |
Move some definitions from sort.h to mksquashfs.h
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
34cb60d8684f79c586b26ef50d843c1db2f572cc |
|
18-Mar-2010 |
plougher <plougher> |
Update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
cee3db8277167c75df4f659d68707e3b0b9c7ec1 |
|
18-Mar-2010 |
plougher <plougher> |
Fix sparse file bug
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f3f95e4c8653082005aa5fef5bd3e8fed164adeb |
|
08-Mar-2010 |
plougher <plougher> |
Progress_bar() generates floating point error when max == 0
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ac28cd1b9c3669cfdaa7e270f26b9652219caa92 |
|
24-Feb-2010 |
plougher <plougher> |
Fix alignment issues with memcpy etc. Gcc is using a memcpy optimised for aligned structures based on the types of the pointers passed. This generates alignment traps on ARM (and probably other CPUs) because the pointers are not aligned. This is a partially overlooked issue when moving from packed structures in Squashfs 3.x and older (which are not guaranteed to be aligned) to un-packed structures in Squashfs 4.0 which are assumed to be aligned. Only partially overlooked because you used to be able to assume if the function prototype pointers were declared as char * (like memcpy), then passed pointers wouldn't be treated as aligned.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
40d8b95803d6c6c51cdc62625832c4291cc52f43 |
|
12-Feb-2010 |
plougher <plougher> |
Fix generic_write_table() TRACE statement
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
44d54ef8e70040ae5171e5b46bd6b0d48df61326 |
|
08-Feb-2010 |
plougher <plougher> |
Fix previous commit. I blame too much beer at FOSDEM.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d49dd12f6bb666a8f60612edd8be85ea14fcc003 |
|
07-Feb-2010 |
plougher <plougher> |
Change get_basename() to use getcwd rather than getting the PWD env var. This fixes the rare case where PWD is not defined!
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
801ba6afc58671750a964fe2e471c2dd08a57608 |
|
01-Feb-2010 |
plougher <plougher> |
Change default cache grow behaviour when appending.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
436648720468c16dd59b853fa7e638df46c3a39c |
|
08-Dec-2009 |
plougher <plougher> |
Also display the compressors available at the end of the options list.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d4a8f46c73904a2284d71952221e8e716c5aef43 |
|
20-Sep-2009 |
plougher <plougher> |
Update date.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
575019113ab93fa622a6955691e5c641611aee99 |
|
20-Sep-2009 |
plougher <plougher> |
Fix rare race condition where fragment writing races with the fragments_outstanding == 0 check and queue_put/queue_get sync sequence at mksquashfs termination.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
286b6b37e26c4516dbda4bb5be6eebe7cc1ce21b |
|
19-Sep-2009 |
plougher <plougher> |
Fix progress bar for dynamic pseudo files
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
54d6729181466f70e58ba568e446c7b7f61927ad |
|
19-Sep-2009 |
plougher <plougher> |
Update inode file size of the dynamic pseudo files
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
11e7b1b6fe39cced2eefa83b6de6cdcd0b4ff1ab |
|
11-Sep-2009 |
plougher <plougher> |
Delete tmp files
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
620b717b90536c4de94303ec90c1b0f080817349 |
|
10-Sep-2009 |
plougher <plougher> |
Fix pseudo file error message and remove superfluous error messages
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d87d8d1646fcf99bddf4182aab21f282b591b5f8 |
|
10-Sep-2009 |
plougher <plougher> |
Fix waitpid() exit status check
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ba674e80dcf875e17ce5eedd057f530ae07a0ab4 |
|
10-Sep-2009 |
plougher <plougher> |
Various improvements to dynamic pseudo file code. Plus add a waitpid() when reading dynamic files using a pipe
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
00d08177d2d5d1b8a5ea3f56459006ba9501335e |
|
03-Sep-2009 |
plougher <plougher> |
Don't use temporary file in dynamic pseudo files
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
259c69a20acee94955a1556f8f93222bd175e0c9 |
|
30-Aug-2009 |
plougher <plougher> |
Update dates.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a326c1872d1959d4a5342ed8210b430c6d8c1c07 |
|
29-Aug-2009 |
plougher <plougher> |
Clean-up appending code. Remove data from 'struct dir_ent' pointing to the original root entries of the filesystem being appended to, and instead use inode ('struct inode_info') to contain the data.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
13df178e33c56016f95b72a33b79c0747b77f1a3 |
|
29-Aug-2009 |
plougher <plougher> |
Move (De)Compressors available message out of display_compressors() function, and fix the output to go to stdout
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
764dab5cd71bda25bc755de08908dbbd58c1a450 |
|
24-Aug-2009 |
plougher <plougher> |
Enable compression default to be selected via Makefile
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
81c52a5f64a644ab61eb244740ff55553c8a60a2 |
|
07-Aug-2009 |
plougher <plougher> |
Update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ff5ea8b69ca4db637ef1e019049085c285385a43 |
|
07-Aug-2009 |
plougher <plougher> |
Add -comp option to options listing, and display the compressors available
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
52a452e54bf1da51f608c6df98d1e0a66c35453e |
|
07-Aug-2009 |
plougher <plougher> |
Make display_compressors() take an indent string
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3763256700217c78ff4012ada3be02ed0a6785ae |
|
07-Aug-2009 |
plougher <plougher> |
Reorder option list and group into categories
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
bb98803edb506b6e99693892350ebeca99c6a3df |
|
06-Aug-2009 |
plougher <plougher> |
Print compression used when reading existing filesystem for appending, and state the -comp option will be ignored
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
62542fb13f09b3c5d76a9a592cc896577dab8863 |
|
06-Aug-2009 |
plougher <plougher> |
Print compression used in filesystem stats
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
394fe0d3cc7aa74d29d3926e4611c337cf776a2a |
|
04-Aug-2009 |
plougher <plougher> |
Fix previous commit
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fbfb2f45899b59632470673a3556e943fb1c6757 |
|
03-Aug-2009 |
plougher <plougher> |
Display compressors available when unsupported compressor is specified on the command line
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8b9a7f62ec60c0c00c059338a050e6d4414bd200 |
|
02-Aug-2009 |
plougher <plougher> |
Fix and extend option argument skipping code when processing exclude and sort options.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ae9dcd89f22fe788e04d7ca65045361118ba15b8 |
|
01-Aug-2009 |
plougher <plougher> |
Add -comp <compression_type> option.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
746ccb8e09f5d80220d83334cd6f0f6df106d4c7 |
|
31-Jul-2009 |
plougher <plougher> |
Update version and date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9699c654883f9dddd7851901f4b8378bf9bac934 |
|
31-Jul-2009 |
plougher <plougher> |
Remove now redundant include of zlib.h
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8c4b7b9e8eb579be49d7f0199255a534f32eb5fc |
|
30-Jul-2009 |
plougher <plougher> |
Set superblock compression type to the compressor id.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a175ce2c010cc74d3ced247f1e92c42ae11616bb |
|
30-Jul-2009 |
plougher <plougher> |
Add support for compressor framework in append code. Also convert call to uncompress to use compressor framework.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
7b8ee50270c5b2061a6dde3e3df639a0d731bc7c |
|
29-Jul-2009 |
plougher <plougher> |
Remove gzip compression code and use new compressor framework.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
71b160b831e721311a19da9e7584dd80b4a1abab |
|
06-May-2009 |
plougher <plougher> |
Print dynamic pseudo file being run to console
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4ab7e512b96a6f4daabc5dfe104a51e6868fd117 |
|
05-May-2009 |
plougher <plougher> |
Add support for new dynamic pseudo diw in dir_scan().
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b34f9f606369f564e2824960f80ebd864dfc9e52 |
|
26-Apr-2009 |
plougher <plougher> |
Add new pseudo set file (file s mode uid gid), which allows you to change the mode, uid and gid of a file being squashed.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
82ab2339a35bf5fb3ebc8bc7a6f316896ae5e5b1 |
|
21-Apr-2009 |
plougher <plougher> |
Fix -Wall warnings
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4f09b4085a49cc4ee4c7a70b2f34b45b21c326dc |
|
21-Apr-2009 |
plougher <plougher> |
Make add_pending_fragment return TRUE
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ab2f812025f7edf14b859d89d5c7396d52e74319 |
|
05-Apr-2009 |
plougher <plougher> |
Update release date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0bb58661dac546df27593c6afdc9b25222ea9b1c |
|
05-Apr-2009 |
plougher <plougher> |
Add pseudo options
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
7e58f4d56d0b0e1232c5afc8623c29024a50b58b |
|
05-Apr-2009 |
plougher <plougher> |
Give pseudo files the filesystem maketime rather than 1970!
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1a3fbf2d5c36d4c6ee68b6c707b60353eba5725e |
|
05-Apr-2009 |
plougher <plougher> |
Make sure pseudo file stat buff is unique
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
43244f2fab97d037256637d47391d2c173047724 |
|
05-Apr-2009 |
plougher <plougher> |
Add pseudo file support
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f6277f82ea19a6f2066e69ab005922f24b7e4459 |
|
31-Mar-2009 |
plougher <plougher> |
Update for release
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
50b31766475b3f04c1aff094e1a39d1010cfbd72 |
|
31-Mar-2009 |
plougher <plougher> |
Yet more code tidying
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
49b57a9513a31ae60713a5ba19fb2b0bb9f840d3 |
|
31-Mar-2009 |
plougher <plougher> |
Use read_from_disk() in get_fragment() rather than a private buffer on the stack.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
03859fa0522dd70de1e48a5ee0bbef504a5c304d |
|
31-Mar-2009 |
plougher <plougher> |
Fix leak in writer_buffer cache!
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
01b4328a47a3c1ecd9ccc3ff6cde37ea973bb3c6 |
|
30-Mar-2009 |
plougher <plougher> |
Add missing isatty checks for TIOCGWINSZ ioctl...
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
360514a0f703af35d48bb60400de7ef3f08ad012 |
|
30-Mar-2009 |
plougher <plougher> |
Finished code tidying
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b360412e11612aed9d3612ecb1d5ee8f25826325 |
|
30-Mar-2009 |
plougher <plougher> |
Still more code tidying
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
110799cf166e78f78e87367c2b8c0f3789fb4c64 |
|
30-Mar-2009 |
plougher <plougher> |
Yet more code tidy
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
17b269cf1364f3b2489320163c6baf5826386b47 |
|
30-Mar-2009 |
plougher <plougher> |
Yet more code tidying
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fd57dfef9ed57f04ded028251a07761138a55c48 |
|
30-Mar-2009 |
plougher <plougher> |
Tidy up some code.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1179b5fffc4d5fb315aff1a4923b73702e666d4e |
|
30-Mar-2009 |
plougher <plougher> |
Change reader_read_file() to use read_bytes() rather than read().
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1d878666da3aa534f64898fbd10e2096fef2f296 |
|
30-Mar-2009 |
plougher <plougher> |
Don't bother printing TIOCGWINSZ ioctl failure message if output is to a file (i.e. log file).
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
898763d3c64a0daa914987eb27ec02c25c195fdb |
|
30-Mar-2009 |
plougher <plougher> |
Quieten progress bar when ouput is sent to a log file. Thanks to Colin Watson of Canonical for this patch...
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e9e01395b2e6b24434f7c4fdbee63d68b99d575c |
|
30-Mar-2009 |
plougher <plougher> |
Get rid of rogue printf and fold check into following check in progress_bar()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
96f85a18718cdaf17b293b9a4cd719d989cfb17f |
|
30-Mar-2009 |
plougher <plougher> |
Remove -1 error return in read_bytes() for an immediate EOF
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8a8c4104c01fee85fc559ea9064aeba6decd189d |
|
30-Mar-2009 |
plougher <plougher> |
Change read_recovery_data() to use read_bytes rather than read() and change read_bytes to take a void * rather than a char *
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
628e768a88bc06f286ac41a23b782a9dd710b68c |
|
30-Mar-2009 |
plougher <plougher> |
Change write_recovery_data() to use write_bytes() rather than write, and change write_bytes() to take a void * rather than a char *
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
41fab29b8556590bf5c606cfe4588b6d7765bb96 |
|
30-Mar-2009 |
plougher <plougher> |
Change writer thread to use write_bytes() rather than write()
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
06a19d326d8a13f8ef000d9197af9bb584c3f922 |
|
30-Mar-2009 |
plougher <plougher> |
Rename read_bytes() to read_destination() and add new read_bytes() function which deals with EINTR and read() returning EOF or less bytes than expected.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0dd6f12ca4a1fa3e4040f2c5a281df0aeb172460 |
|
29-Mar-2009 |
plougher <plougher> |
Rename write_bytes() to write_destination() and add a new write_bytes() routine that deals with EINTR and writes that write less than the expected bytes.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f5a674de8fd749df77318d514f793ff0f2041f35 |
|
25-Mar-2009 |
plougher <plougher> |
Sparse file bug fix
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
df6d8f0fe3f8007518b44e51a674009beaf3b5f1 |
|
20-Mar-2009 |
plougher <plougher> |
Get rid of "little endian" printing, all 4.0 filesystems are now implicitly little endian. Plus reformat printf showing block size, whether data/metadata/ fragments are compressed etc, so that it doesn't go over 80 columns.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
12a159a084d09e32bb2054f1558168e5de9795b5 |
|
03-Mar-2009 |
plougher <plougher> |
Check return status of ftruncate
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a2968ef597a1eaf14dbf4450424a7375b0ac42a7 |
|
03-Mar-2009 |
plougher <plougher> |
Remove some casts and fix a malloc
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
83d0ea12fbff623b6180b18a489ae7f2f9ad5228 |
|
21-Feb-2009 |
plougher <plougher> |
Update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1f288f69d8c734f199dbe1c2ad46633ff30863a3 |
|
21-Feb-2009 |
plougher <plougher> |
Remove if(swap) xxx else xxx code. Swapping macros now handle this.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d9b631e9e82c9e0d0e14b7f3d0f2965c523b113d |
|
08-Feb-2009 |
plougher <plougher> |
Update date on copyright message.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2702e98268c66397751f9ed996a6460f216dba34 |
|
08-Feb-2009 |
plougher <plougher> |
Make swapping code only compiled on big-endian systems.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f11dfd6e99b29627724443c65e57029f9c31d93a |
|
26-Jan-2009 |
plougher <plougher> |
Fix uninitialised s_minor variable
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2d495b91a5dc1a39db896192bdaf10012147c941 |
|
26-Jan-2009 |
plougher <plougher> |
Enable swapping for big-endian architectures and update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
b6e69c75003c5b5f1b0432a653fdee464e8c1f6b |
|
26-Jan-2009 |
plougher <plougher> |
Add missing type casts for new swap macros
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9fca346e286002f3e0db6201923b538a740c78b4 |
|
27-Oct-2008 |
plougher <plougher> |
Improve xattr support
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
3cb4f276fda256d6db01b646f6e941f5cca7d35a |
|
16-Oct-2008 |
plougher <plougher> |
Rename compression type
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
59b13beacf77e1c9d70f1c1bdd38570d7e720c90 |
|
16-Oct-2008 |
plougher <plougher> |
Fill in compression field in superblock.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5b39850c79aafd456403583265480eabe81c9583 |
|
05-Oct-2008 |
plougher <plougher> |
Update code to use new wider 32-bit rdev field.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5025f85981aecede38a02efacb92ef14b9293e1e |
|
20-Aug-2008 |
plougher <plougher> |
Update date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e75b986f40e0225cc64eca27973e1cff2d4e92cd |
|
18-Aug-2008 |
plougher <plougher> |
Fix small bug in progress_bar dealing with block counts exact powers of 10
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
43bb7e97bfd6ae4ee8fb05f99eac90589e60475b |
|
17-Aug-2008 |
plougher <plougher> |
Fix bug in progress_bar() display if no file blocks to compress
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d14b0158d4a34988f3e55a7feede4b575536d4fa |
|
16-Aug-2008 |
plougher <plougher> |
Remove obsolete code setting filesystem 3:0 if block_size <= 65536 and sparse == FALSE
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
62d5b5c849be50e8ae3967ff9ddb4928f133656a |
|
16-Aug-2008 |
plougher <plougher> |
Fix deadlock in TRACE() and disable progress bar if SQUASHFS_TRACE is defined
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
ca2c93f2789861455bdc5ffd0d5ffde3e3cdf665 |
|
15-Aug-2008 |
plougher <plougher> |
Fix rare but nasty bug in append. Bug has been there since 2.1!
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
6c65b03394fdb0d4528adcce83523c5af1586d7a |
|
07-Aug-2008 |
plougher <plougher> |
Remove obsolete -be and -le options. 4.0 layout is fixed litte endian.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1b899fc316f7eba7a31da12dc0c9b69ada441059 |
|
07-Aug-2008 |
plougher <plougher> |
Merge development 4.0 branch onto HEAD. New 4.0 layout is considered stable and reasonably working - Mksquashfs should generate correct 4.0 filesystems, and the kernel code can mount them. Swapping and Unsquashfs still broken, but these can be fixed on MAIN...
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c9b11db40704cc63f65d6fd055fb9688e9cd61f8 |
|
07-May-2008 |
plougher <plougher> |
Display progress_bar at end of mksquashfs and remove redundant progress flag check in progress_bar().
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
57e6d1832ef04c93ee0b89b932a79b13a42f39cd |
|
07-May-2008 |
plougher <plougher> |
Fix race-condition in duplicate() routines where the writer_cache wasn't checked for in-flight blocks in calculating checksum for possible duplicate files.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
91fbb30e6ffbc79953e306cb15747978a15b3d5f |
|
06-May-2008 |
plougher <plougher> |
Serialise output to the screen, so error messages etc. don't appear in the middle of the progress bar. Prepend a carriage return to output messages if the progress bar is being printed, to ensure they appear on separate lines. Also disable the progress bar if -info option is specified.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d1139d567ba136f16d6bfab2fb8ac6e5f58eccc0 |
|
28-Apr-2008 |
plougher <plougher> |
Fix race-condition in fragment locking.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
35a1060e3c2304ffd483ac4f7906127c03f7bbd9 |
|
21-Apr-2008 |
plougher <plougher> |
Move the progress bar into its own separate thread. Also only update progress bar on the completion of a file write and after a 1/4 second if the progress bar hasn't been otherwise updated by the completion of a file write. This reduces the time and I/O overhead of progress bar printing. Also add a rotate for more visual indication.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
217bad8fa5e227be856653f4f1016afffd112a97 |
|
05-Apr-2008 |
plougher <plougher> |
Add -fragment-queue option to control the size of the fragment cache.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0f464448fac85e21f4855f24096553d8f44f9f50 |
|
31-Mar-2008 |
plougher <plougher> |
Add write_buffer cache search in duplicate file check.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4e8484a5f38aadf9114358fc00ae3f17b3ef48ac |
|
16-Mar-2008 |
plougher <plougher> |
Fix threshold calculation to take account of the fact that the fragment compressors can now be holding multiple write buffers while duplicate checking is taking place.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2ea8914afbd13f9b4c8d74100cb1ad7469cdb1f0 |
|
11-Mar-2008 |
plougher <plougher> |
Remove cache_get_2() as it's no longer used. Remove code that waited for all fragments to be written to disk when a file with blocks (not just a fragment) was written (fragments cannot be written in parallel with a file with multiple blocks, as the file blocks have to be written contiguously). Instead when a file with multiple blocks is written, queue generated fragments, and write them after the file is written. This improves parallelism.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
d036a314e696836f1cd5502fa1db1b4062e0d8c8 |
|
08-Mar-2008 |
plougher <plougher> |
Backout some unfinished changes so Mksquashfs still compiles and works.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
76c6408bf2c5a8411141cf69fb07e1ca02bff16e |
|
08-Mar-2008 |
plougher <plougher> |
Fix bugs in remove_hash_table and remove_free_list. Change cache to grow only in response to readahead rather than grow to maximum cache size. Replace fragment pending code used to ensure fragments have been written to disk in get_fragment routine with cache lookup. Add flag to cache code to indicate that read_buffer blocks are to be immediately deleted rather than being retained in the cache because they will never be reused.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
eb6eac9d820d911792ba6eacf53feac7b9c45998 |
|
26-Feb-2008 |
plougher <plougher> |
Replace alloc routines with caching alloc routines implemented initially for parallel unsquashfs.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5aa18168eabc489c1d1a5c9b7932f3413f2386dc |
|
13-Dec-2007 |
plougher <plougher> |
Hitting ^C twice causes mksquashfs to restore the existing filesystem on append. To do this it signals all other threads and waits for them to enter their signal handlers. In rare circumstances when ^C is hit twice the reader thread may have already finished reading the source directories and files, and terminated. This fixes the bug where mksquashfs hangs waiting for the terminated thread to enter its signal handler.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
dc86c3c239f04ffca5abaaf2d6a67845a8d93003 |
|
05-Dec-2007 |
plougher <plougher> |
Fix progress bar where hardlinked files were counted more than once, leading to progress bar not reaching 100% completed.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9d82ca5d14a8d34d2bab1e5ccf9fc6dbb755c513 |
|
30-Nov-2007 |
plougher <plougher> |
Fix Mksquashfs where it used stat to check for existence of source directories and files. This incorrectly flagged dangling symbolic links as non-existent files. Changed to lstat which correct handles this case.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
7354cb7485ddefa2d40f5d3ea629febc5976c9fd |
|
26-Nov-2007 |
plougher <plougher> |
Fix segv and mksquashfs hangs when handling sparse files.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
07966f7fca500300190883badb32436ba0c7f5c8 |
|
14-Nov-2007 |
plougher <plougher> |
More minor code cleanups.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
2337798ecf5e7c96b1f7bbaaae987081068ce379 |
|
12-Nov-2007 |
plougher <plougher> |
More minor code cleanups.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
badfac6146adc1710afc623841a1f933a746a010 |
|
12-Nov-2007 |
plougher <plougher> |
Missed one.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
cc3da86df5c8cccd7cede1f4e197844093a0d87e |
|
12-Nov-2007 |
plougher <plougher> |
Delete some unused variables.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c4ebcf58ed0393c3a66bfdaa215d941d4a4f3c6f |
|
08-Nov-2007 |
rlougher <rlougher> |
Fix small erorr in get_component().
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
e4873e08b465d6ed6ac9f61865bc5e6e82169b06 |
|
08-Nov-2007 |
rlougher <rlougher> |
Fix some function prototypes and return codes.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8f7d0b8fa89777391d6ba013835a2e04af923476 |
|
08-Nov-2007 |
rlougher <rlougher> |
Fix some BAD_ERROR, ERROR and TRACE statements.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
322597985c0e4b8b4fa32381dd3d3c8ca4d9fb03 |
|
01-Nov-2007 |
plougher <plougher> |
Minor fix to the recovery file filename code.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
eac1853fa6f329fc340b313304a1be5dfe5c90fd |
|
29-Oct-2007 |
plougher <plougher> |
Hopefully last changes before new release
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
99ac0cc495784d18a1d764289efdf6fea602785f |
|
29-Oct-2007 |
plougher <plougher> |
Add recovery file writing in Squashfs append.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
806581ad68d079af32172796777feca495a01aa2 |
|
23-Oct-2007 |
plougher <plougher> |
Small bug fix for non-anchored excludes
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
05e50ef692cb8679f2d32569c86d719b4c0b93be |
|
23-Oct-2007 |
plougher <plougher> |
Add support for non anchored excludes. These excludes will match in any place in the filesystem rather than having to be specified starting from the top level directories. Specified by prefixing exclude with ..., i.e. "... filename"
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f9039c94ad25691733cbf9eeaf934e9172a79987 |
|
22-Oct-2007 |
plougher <plougher> |
Handle multiple matching wildcards/regex expressions in intermediate extract directory components
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
934a9edb5a1c820caff4e982956f64865b32e6bf |
|
19-Oct-2007 |
plougher <plougher> |
Enabled extended exclude file handling. To ue extended shell wildcards in exclude dirs/files specify -wildcards (recommended option). To use POSIX regular expressions rather than extended shell wildcards specify -regex. Both options turn off the original exclude file matching mechanism and exclude dirs/files starting with ./, ../, / will not be supported.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8f8e1a118b0defeb6585e70bb42b5b3d2ef23d65 |
|
18-Oct-2007 |
plougher <plougher> |
Add support for extended bash wildcards in exclude files. Currently disabled for further testing. To enable change line 106 to read int old_exclude = FALSE;
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f6cd337f8de328e2b448b9f29c00d9132748f7fe |
|
19-Aug-2007 |
plougher <plougher> |
Update email address.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8dcc699a355bf979bf2bcb89b79fc5d31cb06c81 |
|
17-Aug-2007 |
plougher <plougher> |
Enable sparse files by default.... Disable with -no-sparse.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
341e180dd39ab4257e92be4f7bfc6c5511006027 |
|
13-Aug-2007 |
plougher <plougher> |
Fix bug caused by sparse file work.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1f54edc96999e8be5c8fad08b3b8dd4821aa160a |
|
13-Aug-2007 |
plougher <plougher> |
Fix compile error in sparse file code. More sparse file work. Still disabled, as it is untested.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fbf9f7551459474f8306b7a8a560102733f4cd94 |
|
12-Aug-2007 |
plougher <plougher> |
More work on sparse files.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5b09fd459700d3bdacede68ee5865c5144bb20b1 |
|
06-Aug-2007 |
plougher <plougher> |
Initial support for sparse files. Currently disabled.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4c99cb7f458d8e1c598f1c80793daf3696c9b528 |
|
14-Jun-2007 |
plougher <plougher> |
Increase max block size to 1 Mbyte, and default block size to 128 Kbytes
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
018d2b3b5bda64271196d46984d79c16f6268c46 |
|
23-Apr-2007 |
plougher <plougher> |
Make Mksquashfs deal better with files changing whilst filesystem is being read. Also more work dealing with I/O errors.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
29e3709bc814f5ebf166fb6ab4d6ea51ac98966b |
|
15-Apr-2007 |
plougher <plougher> |
Update Mksquashfs to deal better with file read errors.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
02bc3bcabf2b219f63961f07293b83629948f026 |
|
25-Feb-2007 |
plougher <plougher> |
updated mksquashfs to 3.2-r2
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
aec3da14ab200e558ca7a95692a80b96e59da1af |
|
06-Nov-2006 |
plougher <plougher> |
Update version and date.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
0e45365737bf5283627e32253f2279c4d9fa32d0 |
|
06-Nov-2006 |
plougher <plougher> |
Uodate mksquashfs to mksquashfs3.1-r2 with NFS support
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
5507dd92370ba35d9f1671483beb0d4e47058293 |
|
06-Nov-2006 |
plougher <plougher> |
Update to par_mksquashfs version 3.1
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
a80224fac55b3b5b60bc5ef3a97e3dd525c828bb |
|
17-Aug-2006 |
plougher <plougher> |
Fixed fragment_table rounding bug, and inode number append bug.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
9b5bf8c73c0eaf4f1ba0461615f4ed0d405a30cc |
|
20-Mar-2006 |
plougher <plougher> |
Update CVS repository to the 3.0 release
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
324978d82f2e48cd34ee6f6344ea9b0ee5745526 |
|
27-Feb-2006 |
plougher <plougher> |
More 2.2-r2 merges.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
04b0d5fb877f13636f801e954fb456d458b450ff |
|
10-Feb-2006 |
plougher <plougher> |
A couple of improvements related to hardlink handling (mainly extra print statements showing when hardlinked files are added to the fs).
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
117b2ea29a3a240bc6a063a73f8c11e786313a82 |
|
09-Feb-2006 |
plougher <plougher> |
Fixed sorting so that it now works with 3.0
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
fbed12b2d982d9c984744840516f775f696dcf6b |
|
07-Feb-2006 |
plougher <plougher> |
Bug when multiple source directories/files are specified on command line fixed.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
778e936dda78adf3a50057f778e7862dba183884 |
|
01-Feb-2006 |
plougher <plougher> |
Small bug fixed in append where the new inode numbers were one off.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
058eae41952c33345bd0ef290aea8eef37f3ca92 |
|
30-Jan-2006 |
plougher <plougher> |
Fixed appending.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
df70c3e920ad82bcc5f5f33d5b7c313be6c2ea4f |
|
27-Jan-2006 |
plougher <plougher> |
Additional appending fixes. Not yet tested, and so appending is still disabled.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
4c9b090b96c10193f33f9985a5a5c11eb1d23ae3 |
|
25-Jan-2006 |
plougher <plougher> |
Initial work on getting appending working
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
769592935b09063a5493ebeb530c599753ece5d2 |
|
24-Jan-2006 |
plougher <plougher> |
Updated release date and copyright information
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
f9c72b137336d5c1d4bdf2792f2bc5142713676b |
|
23-Jan-2006 |
plougher <plougher> |
New meta-index cache for file indexes. This significantly speeds up reading speed for files larger than 1 Gb (typically 6 times reduction in sys time). Many bug fixes related to handling files larger than 4 Gb.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
6885329bcc96ee32463e2e9372e8971bfbc386b3 |
|
27-Dec-2005 |
plougher <plougher> |
Fixed the endianness MACRO detection code. It should work (at least) for Linux and BSD systems.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
751d4971ee65f6cd867bb649805a549de602328f |
|
21-Dec-2005 |
plougher <plougher> |
Fixed some large file bugs (> 2 GB).
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
34ce0e6a39c4325937c6d55731226269395bd088 |
|
12-Dec-2005 |
plougher <plougher> |
Updated Mksquashfs version date
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
8cb05cde913bb04297020629566540981a649273 |
|
12-Dec-2005 |
plougher <plougher> |
A couple of minor code changes, mainly to allow Mksquashfs to build on Mac OS X without warnings.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
c2759614989e149db2bad2e8845b4d9f9123cf89 |
|
23-Nov-2005 |
plougher <plougher> |
Updated email address and copyright dates.
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|
1f413c84d736495fd61ff05ebe52c3a01a4d95c2 |
|
18-Nov-2005 |
plougher <plougher> |
Initial revision
/external/squashfs-tools/squashfs-tools/mksquashfs.c
|