summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* [patch 7/7] vfs: mountinfo: show dominating group idMiklos Szeredi2008-04-233-2/+59
| | | | | | | | Show peer group ID of nearest dominating group that has intersection with the mount's namespace. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [patch 6/7] vfs: mountinfo: add /proc/<pid>/mountinfoRam Pai2008-04-232-23/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [mszeredi@suse.cz] rewrite and split big patch into managable chunks /proc/mounts in its current form lacks important information: - propagation state - root of mount for bind mounts - the st_dev value used within the filesystem - identifier for each mount and it's parent It also suffers from the following problems: - not easily extendable - ambiguity of mountpoints within a chrooted environment - doesn't distinguish between filesystem dependent and independent options - doesn't distinguish between per mount and per super block options This patch introduces /proc/<pid>/mountinfo which attempts to address all these deficiencies. Code shared between /proc/<pid>/mounts and /proc/<pid>/mountinfo is extracted into separate functions. Thanks to Al Viro for the help in getting the design right. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [patch 5/7] vfs: mountinfo: allow using process rootMiklos Szeredi2008-04-232-63/+59
| | | | | | | | | | | | | | | | | | Allow /proc/<pid>/mountinfo to use the root of <pid> to calculate mountpoints. - move definition of 'struct proc_mounts' to <linux/mnt_namespace.h> - add the process's namespace and root to this structure - pass a pointer to 'struct proc_mounts' into seq_operations In addition the following cleanups are made: - use a common open function for /proc/<pid>/{mounts,mountstat} - surround namespace.c part of these proc files with #ifdef CONFIG_PROC_FS - make the seq_operations structures const Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [patch 4/7] vfs: mountinfo: add mount peer group IDMiklos Szeredi2008-04-232-4/+94
| | | | | | | | | | | | | | | | | | | | | | | | Add a unique ID to each peer group using the IDR infrastructure. The identifiers are reused after the peer group dissolves. The IDR structures are protected by holding namepspace_sem for write while allocating or deallocating IDs. IDs are allocated when a previously unshared vfsmount becomes the first member of a peer group. When a new member is added to an existing group, the ID is copied from one of the old members. IDs are freed when the last member of a peer group is unshared. Setting the MNT_SHARED flag on members of a subtree is done as a separate step, after all the IDs have been allocated. This way an allocation failure can be cleaned up easilty, without affecting the propagation state. Based on design sketch by Al Viro. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [patch 3/7] vfs: mountinfo: add mount IDMiklos Szeredi2008-04-231-0/+34
| | | | | | | | Add a unique ID to each vfsmount using the IDR infrastructure. The identifiers are reused after the vfsmount is freed. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [patch 2/7] vfs: mountinfo: add seq_file_root()Miklos Szeredi2008-04-232-8/+46
| | | | | | | | | | | | | Add a new function: seq_file_root() This is similar to seq_path(), but calculates the path relative to the given root, instead of current->fs->root. If the path was unreachable from root, then modify the root parameter to reflect this. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [patch 1/7] vfs: mountinfo: add dentry_path()Ram Pai2008-04-232-40/+115
| | | | | | | | | | | | | | | | | | [mszeredi@suse.cz] split big patch into managable chunks Add the following functions: dentry_path() seq_dentry() These are similar to d_path() and seq_path(). But instead of calculating the path within a mount namespace, they calculate the path from the root of the filesystem to a given dentry, ignoring mounts completely. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [PATCH] remove unused label in xattr.c (noise from ro-bind)Al Viro2008-04-231-1/+0
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Merge branch 'for-linus' of ↵Linus Torvalds2008-04-228-43/+63
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-221-3/+1
| | | | | | | | | | | | | | | | 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-221-0/+3
| | | | | | | | | | | | | | 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-212-4/+13
| | | | | | | | | | | | | | 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-211-2/+1
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * [PATCH] get rid of more nameidata passing in namespace.cAl Viro2008-04-211-28/+25
| | | | | | | | | | | | | | 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-211-5/+6
| | | | | | | | | | | | 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-211-4/+4
| | | | | | | | | | | | | | | | | | | | 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-213-0/+13
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | fs: use loff_t type instead of long longDavid Sterba2008-04-222-4/+4
| | | | | | | | | | | | | | 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-2214-111/+211
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-218-88/+134
| | | | | | | | | | | | | | | | | | | | | 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-215-16/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-212-2/+1
| | | | | | | | | | | | | | | | | | | | | 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-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2222-1361/+1172
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-179-203/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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-172-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-175-14/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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-172-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | 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-171-0/+1
| | | | | | | | | | | | | | | | | | | | | 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-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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-171-1/+5
| | | | | | | | | | | | | | | | | | | | | 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-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-142/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-80/+85
| | | | | | | | | | | | | | | | | | | | | | | | 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-171-56/+62
| | | | | | | | | | | | Signed-off-by: Jan Kara <jack@suse.cz>
| * | udf: Improve error recovery on mountJan Kara2008-04-171-44/+42
| | | | | | | | | | | | | | | | | | | | | | | | 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-171-54/+81
| | | | | | | | | | | | | | | | | | | | | 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-171-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-92/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-37/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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-171-1/+1
| | | | | | | | | | | | | | | | | | | | | 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-171-282/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-173-39/+5
| | | | | | | | | | | | | | | | | | | | | 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-174-53/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-174-42/+37
| | | | | | | | | | | | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
OpenPOWER on IntegriCloud