aboutsummaryrefslogtreecommitdiff
path: root/squashfs-tools/info.c
AgeCommit message (Collapse)Author
2015-02-23info: fix missing ')' in queue and cache dumpPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23Update copyright messagesPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: fix a potential non-default option deadlockPhillip Lougher
Fix a potential deadlock in Mksquashfs that may be triggerable using non-default options. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23caches-queues-lists: dump the fragment reserve cachePhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23caches-queues-lists: dump reader thread -> process fragment threads queuePhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: simplify print_filename in info.cPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23info: take temporary copy of "ent"Phillip Lougher
dir_ent may get updated asyncronously while using it. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: rename from_reader queue to to_deflatePhillip Lougher
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>
2015-02-23info: squash dump_state() output so it again fits into a 80x24 terminal windowPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23info: add locked fragment queue to dump_state()Phillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23caches-queues-list: update informational printf in dump_state()Phillip Lougher
The uncompressed fragment buffers are now queued directly by the reader thread, rather than being queued by the deflate thread(s) Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: change queue name from "from_deflate" to "to_main"Phillip Lougher
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>
2015-02-23caches-queues-lists: make queue dump more informativePhillip Lougher
Rather than giving the name of the queue, describe what the queue does! Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23caches-queues-lists: implement dump_seq_queuePhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: replace generic queue with specialised "sequential queue"Phillip Lougher
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>
2015-02-23info: dump queue and cache status if ^\ hit twice within one secondPhillip Lougher
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>
2015-02-23info: add code to dump cache statePhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23info: add some newlines to the queue printfsPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23info: add initial code to dump queue state when sent SIGHUPPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23info: handle asprintf failure properlyPhillip Lougher
Cleanup asprintf error handling. Print an ERROR and return without doing anything else. Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23info: move filename printing into separate functionPhillip Lougher
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
2015-02-23mksquashfs: print file being squashed when ^\ (SIGQUIT) typedPhillip Lougher
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>