aboutsummaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAge
* Merge branch 'for-linus' of ↵Linus Torvalds2008-04-22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: [PATCH] get rid of __exit_files(), __exit_fs() and __put_fs_struct() [PATCH] proc_readfd_common() race fix [PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe() [PATCH] teach seq_file to discard entries [PATCH] umount_tree() will unhash everything itself [PATCH] get rid of more nameidata passing in namespace.c [PATCH] switch a bunch of LSM hooks from nameidata to path [PATCH] lock exclusively in collect_mounts() and drop_collected_mounts() [PATCH] move a bunch of declarations to fs/internal.h
| * [PATCH] proc_readfd_common() race fixAl Viro2008-04-22
| | | | | | | | | | | | | | | | Since we drop the rcu_read_lock inside the loop, we can't assume that files->fdt will remain unchanged (and not freed) between iterations. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe()Al Viro2008-04-22
| | | | | | | | | | | | | | Duh... Fortunately, the bug is quite recent (post-2.6.25) and, embarrassingly, mine ;-/ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] teach seq_file to discard entriesAl Viro2008-04-21
| | | | | | | | | | | | | | Allow ->show() return SEQ_SKIP; that will discard all output from that element and move on. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] umount_tree() will unhash everything itselfAl Viro2008-04-21
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] get rid of more nameidata passing in namespace.cAl Viro2008-04-21
| | | | | | | | | | | | | | Further reduction of stack footprint (sys_pivot_root()); lose useless BKL in there, while we are at it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] switch a bunch of LSM hooks from nameidata to pathAl Viro2008-04-21
| | | | | | | | | | | | Namely, ones from namespace.c Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] lock exclusively in collect_mounts() and drop_collected_mounts()Al Viro2008-04-21
| | | | | | | | | | | | | | | | | | | | Taking namespace_sem shared there isn't worth the trouble, especially with vfsmount ID allocation about to be added. That way we know that umount_tree(), copy_tree() and clone_mnt() are _always_ serialized by namespace_sem. umount_tree() still needs vfsmount_lock (it manipulates hash chains, among other things), but that's a separate story. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] move a bunch of declarations to fs/internal.hAl Viro2008-04-21
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | fs: use loff_t type instead of long longDavid Sterba2008-04-22
| | | | | | | | | | | | | | Use offset type consistently. Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'for-linus' of ↵Linus Torvalds2008-04-22
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm: dlm: linux/{dlm,dlm_device}.h: cleanup for userspace dlm: common max length definitions dlm: move plock code from gfs2 dlm: recover nodes that are removed and re-added dlm: save master info after failed no-queue request dlm: make dlm_print_rsb() static dlm: match signedness between dlm_config_info and cluster_set
| * | dlm: common max length definitionsDavid Teigland2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add central definitions for max lockspace name length and max resource name length. The lack of central definitions has resulted in scattered private definitions which we can now clean up, including an unused one in dlm_device.h. Signed-off-by: David Teigland <teigland@redhat.com>
| * | dlm: move plock code from gfs2David Teigland2008-04-21
| | | | | | | | | | | | | | | | | | | | | Move the code that handles cluster posix locks from gfs2 into the dlm so that it can be used by both gfs2 and ocfs2. Signed-off-by: David Teigland <teigland@redhat.com>
| * | dlm: recover nodes that are removed and re-addedDavid Teigland2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a node is removed from a lockspace, and then added back before the dlm is notified of the removal, the dlm will not detect the removal and won't clear the old state from the node. This is fixed by using a list of added nodes so the membership recovery can detect when a newly added node is already in the member list. Signed-off-by: David Teigland <teigland@redhat.com>
| * | dlm: save master info after failed no-queue requestDavid Teigland2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a NOQUEUE request fails, the rsb res_master field is unnecessarily reset to -1, instead of leaving the valid master setting in place. We want to save the looked-up master values while the rsb is on the "toss list" so that another lookup can be avoided if the rsb is soon reused. The fix is to simply leave res_master value alone. Signed-off-by: David Teigland <teigland@redhat.com>
| * | dlm: make dlm_print_rsb() staticAdrian Bunk2008-04-21
| | | | | | | | | | | | | | | | | | | | | dlm_print_rsb() can now become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Teigland <teigland@redhat.com>
| * | dlm: match signedness between dlm_config_info and cluster_setHarvey Harrison2008-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cluster_set is only called from the macro CLUSTER_ATTR which defines read/write access functions. Make the signedness match to avoid sparse warnings every time CLUSTER_ATTR is used (lines 149-159) all of the form: fs/dlm/config.c:149:1: warning: incorrect type in argument 3 (different signedness) fs/dlm/config.c:149:1: expected unsigned int *info_field fs/dlm/config.c:149:1: got int extern [toplevel] *<noident> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David Teigland <teigland@redhat.com>
* | | Merge branch 'for_linus' of ↵Linus Torvalds2008-04-22
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6: (41 commits) udf: use crc_itu_t from lib instead of udf_crc udf: Fix compilation warnings when UDF debug is on udf: Fix bug in VAT mapping code udf: Add read-only support for 2.50 UDF media udf: Fix handling of multisession media udf: Mount filesystem read-only if it has pseudooverwrite partition udf: Handle VAT packed inside inode properly udf: Allow loading of VAT inode udf: Fix detection of VAT version udf: Silence warning about accesses beyond end of device udf: Improve anchor block detection udf: Cleanup anchor block detection. udf: Move processing of virtual partitions udf: Move filling of partition descriptor info into a separate function udf: Improve error recovery on mount udf: Cleanup volume descriptor sequence processing udf: fix anchor point detection udf: Remove declarations of arrays of size UDF_NAME_LEN (256 bytes) udf: Remove checking of existence of filename in udf_add_entry() udf: Mark udf_process_sequence() as noinline ...
| * | udf: use crc_itu_t from lib instead of udf_crcBob Copeland2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out by Sergey Vlasov, UDF implements its own version of the CRC ITU-T V.41. Convert it to use the one in the library. Signed-off-by: Bob Copeland <me@bobcopeland.com> Cc: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Fix compilation warnings when UDF debug is onSebastian Manciulea2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | Fix two compilation warnings (and actual bugs in message formatting) when UDF debugging is turned on. Signed-off-by: Sebastian Manciulea <manciuleas@yahoo.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Fix bug in VAT mapping codeSebastian Manciulea2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix mapping of blocks using VAT when it is stored in an inode. UDF_I(inode)->i_data already points to the beginning of VAT header so there's no need to add udf_ext0_offset(inode). Signed-off-by: Sebastian Manciulea <manciuleas@yahoo.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Add read-only support for 2.50 UDF mediaJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements parsing of metadata partitions and reading of Metadata File thus allowing to read UDF 2.50 media. Error resilience is implemented through accessing the Metadata Mirror File in case the data the Metadata File cannot be read. The patch is based on the original patch by Sebastian Manciulea <manciuleas@yahoo.com> and Mircea Fedoreanu <mirceaf_spl@yahoo.com>. Signed-off-by: Sebastian Manciulea <manciuleas@yahoo.com> Signed-off-by: Mircea Fedoreanu <mirceaf_spl@yahoo.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Fix handling of multisession mediaSebastian Manciulea2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to OSTA UDF specification, only anchor blocks and primary volume descriptors are placed on media relative to the last session. All other block numbers are absolute (in the partition or the whole media). This seems to be confirmed by multisession media created by other systems. Signed-off-by: Sebastian Manciulea <manciuleas@yahoo.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Mount filesystem read-only if it has pseudooverwrite partitionJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | As we don't properly support writing to pseudooverwrite partition (we should add entries to VAT and relocate blocks instead of just writing them), mount filesystems with such partition as read-only. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Handle VAT packed inside inode properlyJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | We didn't handle VAT packed inside the inode - we tried to call udf_block_map() on such file which lead to strange results at best. Add proper handling of packed VAT as we do it with other packed files. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Allow loading of VAT inodeJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | UDF media with VAT could have never worked because udf_fill_inode() didn't know about case FILE_TYPE_VAT20. Fix this. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Fix detection of VAT versionJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | We incorrectly (way to strictly) checked version of VAT on loading and thus refuse to mount correct media. There are just two format versions - below 2.0 and above 2.0 and we understand both. So update the version check accordingly. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Silence warning about accesses beyond end of deviceJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | Some of the computed positions of anchor block could be beyond the end of device. Skip reading such blocks. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Improve anchor block detectionJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add <last block>+1 and <last block>-1 to a list of blocks which can be the real last recorded block on a UDF media. Sebastian Manciulea <manciuleas@yahoo.com> claims this helps some drive + media combinations he is able to test. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Cleanup anchor block detection.Jan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UDF anchor block detection is complicated by several things - there are several places where the anchor point can be, some of them relative to the last recorded block which some devices report wrongly. Moreover some devices on some media seem to have 7 spare blocks sectors for every 32 blocks (at least as far as I understand the old code) so we have to count also with that possibility. This patch splits anchor block detection into several functions so that it is clearer what we actually try to do. We fix several bugs of the type "for such and such media, we fail to check block blah" as a result of the cleanup. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Move processing of virtual partitionsJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | This patch move processing of UDF virtual partitions close to the place where other partition types are processed. As a result we now also properly fill in partition access type. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Move filling of partition descriptor info into a separate functionJan Kara2008-04-17
| | | | | | | | | | | | Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Improve error recovery on mountJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | Report error when we fail to allocate memory for a bitmap and properly release allocated memory and inodes for all the partitions in case of mount failure and umount. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Cleanup volume descriptor sequence processingJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | Cleanup processing of volume descriptor sequence so that it is more readable, make code handle errors (e.g. media problems) better. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: fix anchor point detectionPavel Emelyanov2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to ECMA 167 rev. 3 (see 3/8.4.2.1), Anchor Volume Descriptor Pointer should be recorded at two or more anchor points located at sectors 256, N, N - 256, where N - is a largest logical sector number at volume space. So we should always try to detect N on UDF volume before trying to find Anchor Volume Descriptor (i.e. calling to udf_find_anchor()). That said, all this patch does is updates the s_last_block even if the udf_vrs() returns positive value. Originally written and tested by Yuri Per, ported on latest mainline by me. Signed-off-by: Yuri Per <Yuri.Per@acronis.com> Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: Max Lyadvinsky <Max.Lyadvinsky@acronis.com> Cc: Vladimir Simonov <Vladimir.Simonov@acronis.com> Cc: Andrew Neporada <Andrew.Neporada@acronis.com> Cc: Kirill Korotaev <dev@openvz.org> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Remove declarations of arrays of size UDF_NAME_LEN (256 bytes)Jan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are several places in UDF where we declared temporary arrays of UDF_NAME_LEN bytes on stack. This is not nice to stack usage so this patch changes those places to use kmalloc() instead. Also clean up bail-out paths in those functions when we are changing them. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Remove checking of existence of filename in udf_add_entry()Jan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | We don't have to check whether a directory entry already exists in a directory when creating a new one since we've already checked that earlier by lookup and we are holding directory i_mutex all the time. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Mark udf_process_sequence() as noinlineJan Kara2008-04-17
| | | | | | | | | | | | | | | | | | | | | Mark udf_process_sequence() as noinline since stack usage is terrible otherwise. Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: super.c reorganizationMarcin Slusarz2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reorganize few code blocks in super.c which were needlessly indented (and hard to read): so change from: rettype fun() { init; if (sth) { long block of code; } } to: rettype fun() { init; if (!sth) return; long block of code; } or from: rettype fun2() { init; while (sth) { init2(); if (sth2) { long block of code; } } } to: rettype fun2() { init; while (sth) { init2(); if (!sth2) continue; long block of code; } } Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: remove unneeded kernel_timestamp typeMarcin Slusarz2008-04-17
| | | | | | | | | | | | | | | | | | | | | remove now unneeded kernel_timestamp type with conversion functions Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: convert udf_stamp_to_time and udf_time_to_stamp to use timestampsMarcin Slusarz2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kernel_timestamp type was almost unused - only callers of udf_stamp_to_time and udf_time_to_stamp used it, so let these functions handle endianness internally and don't clutter code with conversions * rename udf_stamp_to_time to udf_disk_stamp_to_time and udf_time_to_stamp to udf_time_to_disk_stamp Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: convert udf_stamp_to_time to return struct timespecmarcin.slusarz@gmail.com2008-04-17
| | | | | | | | | | | | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: create function for conversion from timestamp to timespecmarcin.slusarz@gmail.com2008-04-17
| | | | | | | | | | | | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: udf_get_block, inode_bmap - remove unneeded checksmarcin.slusarz@gmail.com2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | block cannot be less than 0, because it's sector_t, so remove unneeded checks Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: convert udf_count_free_bitmap to use bitmap_weightMarcin Slusarz2008-04-17
| | | | | | | | | | | | | | | | | | | | | replace handwritten bits counting with bitmap_weight Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: replace udf_*_offset macros with functionsmarcin.slusarz@gmail.com2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | - translate udf_file_entry_alloc_offset macro into function - translate udf_ext0_offset macro into function - add comment about crypticly named fields in struct udf_inode_info Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: simplify __udf_read_inodemarcin.slusarz@gmail.com2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | - move all brelse(ibh) after main if, because it's called on every path except one where ibh is null - move variables to the most inner blocks Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: replace all adds to little endians variables with le*_add_cpumarcin.slusarz@gmail.com2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replace all: little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) + expression_in_cpu_byteorder); with: leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder); sparse didn't generate any new warning with this patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: truncate: create function for updating of Allocation Ext Descriptormarcin.slusarz@gmail.com2008-04-17
| | | | | | | | | | | | | | | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: simple cleanup of truncate.cmarcin.slusarz@gmail.com2008-04-17
| | | | | | | | | | | | | | | | | | | | | | | | - remove one indentation level by little code reorganization - convert "if (smth) BUG();" to "BUG_ON(smth);" Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>