summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* Squashfs: fragment block operationsPhillip Lougher2009-01-051-0/+98
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: export operationsPhillip Lougher2009-01-051-0/+155
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: super block operationsPhillip Lougher2009-01-051-0/+440
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: symlink operationsPhillip Lougher2009-01-051-0/+118
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: regular file operationsPhillip Lougher2009-01-051-0/+502
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: directory readdir operationsPhillip Lougher2009-01-051-0/+235
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: directory lookup operationsPhillip Lougher2009-01-051-0/+242
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Squashfs: inode operationsPhillip Lougher2009-01-051-0/+346
| | | | Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
* Merge branch 'audit.b61' of ↵Linus Torvalds2009-01-041-6/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current * 'audit.b61' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: audit: validate comparison operations, store them in sane form clean up audit_rule_{add,del} a bit make sure that filterkey of task,always rules is reported audit rules ordering, part 2 fixing audit rule ordering mess, part 1 audit_update_lsm_rules() misses the audit_inode_hash[] ones sanitize audit_log_capset() sanitize audit_fd_pair() sanitize audit_mq_open() sanitize AUDIT_MQ_SENDRECV sanitize audit_mq_notify() sanitize audit_mq_getsetattr() sanitize audit_ipc_set_perm() sanitize audit_ipc_obj() sanitize audit_socketcall don't reallocate buffer in every audit_sockaddr()
| * sanitize audit_fd_pair()Al Viro2009-01-041-6/+1
| | | | | | | | | | | | | | * no allocations * return void Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | fs: symlink write_begin allocation context fixNick Piggin2009-01-0419-30/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the write_begin/write_end aops, page_symlink was broken because it could no longer pass a GFP_NOFS type mask into the point where the allocations happened. They are done in write_begin, which would always assume that the filesystem can be entered from reclaim. This bug could cause filesystem deadlocks. The funny thing with having a gfp_t mask there is that it doesn't really allow the caller to arbitrarily tinker with the context in which it can be called. It couldn't ever be GFP_ATOMIC, for example, because it needs to take the page lock. The only thing any callers care about is __GFP_FS anyway, so turn that into a single flag. Add a new flag for write_begin, AOP_FLAG_NOFS. Filesystems can now act on this flag in their write_begin function. Change __grab_cache_page to accept a nofs argument as well, to honour that flag (while we're there, change the name to grab_cache_page_write_begin which is more instructive and does away with random leading underscores). This is really a more flexible way to go in the end anyway -- if a filesystem happens to want any extra allocations aside from the pagecache ones in ints write_begin function, it may now use GFP_KERNEL (rather than GFP_NOFS) for common case allocations (eg. ocfs2_alloc_write_ctxt, for a random example). [kosaki.motohiro@jp.fujitsu.com: fix ubifs] [kosaki.motohiro@jp.fujitsu.com: fix fuse] Signed-off-by: Nick Piggin <npiggin@suse.de> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: <stable@kernel.org> [2.6.28.x] Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> [ Cleaned up the calling convention: just pass in the AOP flags untouched to the grab_cache_page_write_begin() function. That just simplifies everybody, and may even allow future expansion of the logic. - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | fs: introduce bgl_lock_ptr()Pekka Enberg2009-01-041-0/+6
|/ | | | | | | | | | | | | | | | As suggested by Andreas Dilger, introduce a bgl_lock_ptr() helper in <linux/blockgroup_lock.h> and add separate sb_bgl_lock() helpers to filesystem specific header files to break the hidden dependency to struct ext[234]_sb_info. Also, while at it, convert the macros to static inlines to try make up for all the times I broke Andrew Morton's tree. Acked-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'cpus4096-for-linus-3' of ↵Linus Torvalds2009-01-031-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits) x86: setup_per_cpu_areas() cleanup cpumask: fix compile error when CONFIG_NR_CPUS is not defined cpumask: use alloc_cpumask_var_node where appropriate cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t x86: use cpumask_var_t in acpi/boot.c x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids sched: put back some stack hog changes that were undone in kernel/sched.c x86: enable cpus display of kernel_max and offlined cpus ia64: cpumask fix for is_affinity_mask_valid() cpumask: convert RCU implementations, fix xtensa: define __fls mn10300: define __fls m32r: define __fls h8300: define __fls frv: define __fls cris: define __fls cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS cpumask: zero extra bits in alloc_cpumask_var_node cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/ cpumask: convert mm/ ...
| * Merge branch 'master' of ↵Rusty Russell2008-12-31139-14278/+12319
| |\ | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: arch/x86/kernel/io_apic.c
| * | bitmap: fix seq_bitmap and seq_cpumask to take const pointerRusty Russell2008-12-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: cleanup seq_bitmap just calls bitmap_scnprintf on the bits: that arg can be const. Similarly, seq_cpumask just calls seq_bitmap. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | | get rid of special-casing the /sbin/loader on alphaAl Viro2009-01-031-39/+0
| | | | | | | | | | | | | | | | | | | | | ... just make it a binfmt handler like #! one. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | sanitize ifdefs in binfmt_aoutAl Viro2009-01-031-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are actually alpha vs. i386/arm/m68k i.e. ecoff vs. aout. In the only place where we actually tried to handle arm and i386/m68k in different ways (START_DATA() in coredump handling), the arm variant works for all of them (i386 and m68k have u.start_code set to 0). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | remove the rudiment of a.out for sparcAl Viro2009-01-031-64/+1
| | | | | | | | | | | | | | | | | | | | | it's been used only in sunos compat Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6Linus Torvalds2009-01-0220-474/+924
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'linux-next' of git://git.infradead.org/ubifs-2.6: (33 commits) UBIFS: add more useful debugging prints UBIFS: print debugging messages properly UBIFS: fix numerous spelling mistakes UBIFS: allow mounting when short of space UBIFS: fix writing uncompressed files UBIFS: fix checkpatch.pl warnings UBIFS: fix sparse warnings UBIFS: simplify make_free_space UBIFS: do not lie about used blocks UBIFS: restore budg_uncommitted_idx UBIFS: always commit on unmount UBIFS: use ubi_sync UBIFS: always commit in sync_fs UBIFS: fix file-system synchronization UBIFS: fix constants initialization UBIFS: avoid unnecessary calculations UBIFS: re-calculate min_idx_size after the commit UBIFS: use nicer 64-bit math UBIFS: fix available blocks count UBIFS: various comment improvements and fixes ...
| * | | UBIFS: add more useful debugging printsArtem Bityutskiy2008-12-311-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Print node sizes and maximum node sizes. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: print debugging messages properlyArtem Bityutskiy2008-12-311-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot use ubifs_err() macro with DBGKEY() and DBGKEY1(), because this is racy and holding dbg_lock is needed. Use dbg_err() instead, which does have the lock held. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix numerous spelling mistakesArtem Bityutskiy2008-12-313-12/+11
| | | | | | | | | | | | | | | | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: allow mounting when short of spaceArtem Bityutskiy2008-12-311-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is fine if there is not free space - we should still allow mounting this FS. This patch relaxes the free space requirements and adds info dumps. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix writing uncompressed filesArtem Bityutskiy2008-12-312-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UBIFS does not disable compression if ui->flags is non-zero, e.g. if the file has "sync" flag. This is because of the typo which is fixed by this patch. The patch also adds a couple of useful debugging prints. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix checkpatch.pl warningsArtem Bityutskiy2008-12-316-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are mostly long lines and wrong indentation warning fixes. But also there are two volatile variables and checkpatch.pl complains about them: WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt + volatile int gc_seq; WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt + volatile int gced_lnum; Well, we anyway use smp_wmb() for c->gc_seq and c->gced_lnum, so these 'volatile' modifiers can be just dropped. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix sparse warningsArtem Bityutskiy2008-12-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fs/ubifs/compress.c:111:8: warning: incorrect type in argument 5 (different signedness) fs/ubifs/compress.c:111:8: expected unsigned int *dlen fs/ubifs/compress.c:111:8: got int *out_len fs/ubifs/compress.c:175:10: warning: incorrect type in argument 5 (different signedness) fs/ubifs/compress.c:175:10: expected unsigned int *dlen fs/ubifs/compress.c:175:10: got int *out_len Fix this by adding a cast to (unsigned int *). We guarantee that our lengths are small and no overflow is possible. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: simplify make_free_spaceArtem Bityutskiy2008-12-311-102/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'make_free_space()' function was too complex and this patch simplifies it. It also fixes a bug - the freespace test failed straight away on UBI volumes with 512 bytes LEB size. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: do not lie about used blocksArtem Bityutskiy2008-12-311-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not force UBIFS return 0 used space when it is empty. It leads to a situation when creating any file immediately produces tens of used blocks, which looks very weird. It is better to be honest and say that some blocks are used even if the FS is empty. And ext2 does the same. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: restore budg_uncommitted_idxArtem Bityutskiy2008-12-311-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UBIFS stores uncommitted index size in c->budg_uncommitted_idx, and this affect budgeting calculations. When mounting and replaying, this variable is not updated, so we may end up with "over-budgeting". This patch fixes the issue. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: always commit on unmountArtem Bityutskiy2008-12-311-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UBIFS commits on unmount to make the next mount faster. Currently, it commits only if there is more than LEB size bytes in the journal. This is not very good, because journal size may be large (512KiB). And there may be few deletions in the journal which do not take much journal space, but which do introduce a lot of TNC changes and make mount slow. Thus, jurt remove this condition and always commit. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: use ubi_syncArtem Bityutskiy2008-12-311-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | UBI now has (fake for now, though) synchronization call - use it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: always commit in sync_fsArtem Bityutskiy2008-12-311-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always run commit in sync_fs, because even if the journal seems to be almost empty, there may be a deletion which removes a large file, which affects the index greatly. And because we want better free space predictions after 'sync_fs()', we have to commit. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix file-system synchronizationArtem Bityutskiy2008-12-311-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Argh. The ->sync_fs call is called _before_ all inodes are flushed. This means we first sync write buffers and commit, then all inodes are synced, and we end up with unflushed write buffers! Fix this by forcing synching all indoes from 'ubifs_sync_fs()'. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix constants initializationArtem Bityutskiy2008-12-311-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The c->min_idx_lebs constant depends on c->old_idx_sz, which is read from the master node. This means that we have to initialize c->min_idx_lebs only after we have read the master node. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: avoid unnecessary calculationsArtem Bityutskiy2008-12-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not calculate min_idx_lebs, because it is available in c->min_idx_lebs Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: re-calculate min_idx_size after the commitArtem Bityutskiy2008-12-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we commit, but before we try to write anything to the flash media, @c->min_idx_size is inaccurate, because we do not re-calculate it after the commit. Do not forget to do this. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: use nicer 64-bit mathArtem Bityutskiy2008-12-236-35/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using do_div(), use better primitives from linux/math64.h. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix available blocks countArtem Bityutskiy2008-12-233-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take into account that 2 eraseblocks are never available because they are reserved for the index. This gives more realistic count of FS blocks. To avoid future confusions like this, introduce a constant. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: various comment improvements and fixesArtem Bityutskiy2008-12-232-22/+24
| | | | | | | | | | | | | | | | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: improve budgeting dumpArtem Bityutskiy2008-12-233-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | Dump available space calculated by budgeting subsystem. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix tnc dumpingArtem Bityutskiy2008-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | debugfs tnc dumping was broken because of an obvious typo. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: use PAGE_CACHE_MASK correctlyArtem Bityutskiy2008-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It has high bits set, not low bits set as the UBIFS code assumed. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: fix section mismatchAlexey Dobriyan2008-12-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following section mismatch: WARNING: fs/ubifs/ubifs.o(.init.text+0xec): Section mismatch in reference from the function init_module() to the function .exit.text:ubifs_compressors_exit() Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: introduce LPT dump functionArtem Bityutskiy2008-12-035-48/+186
| | | | | | | | | | | | | | | | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: dump stack in LPT check functionsArtem Bityutskiy2008-12-031-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is useful to know how we got to the checking function when hunting the bugs. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: run debugging checks only if they are enabledArtem Bityutskiy2008-12-032-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not forget to check whether lpt debugging is enabled before running the check functions. This commit also makes some spelling fixes. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: add debugfs supportArtem Bityutskiy2008-12-034-20/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to have a possibility to see various UBIFS variables and ask UBIFS to dump various information. Debugfs is what we need. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: separate debugging fields outArtem Bityutskiy2008-12-039-113/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new data structure which contains all debugging stuff inside. This is cleaner than having debugging stuff directly in 'c'. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: avoid unnecessary checksKukkonen Mika2008-12-031-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have a habit of compiling kernel with EXTRA_CFLAGS="-Wextra -Wno-unused -Wno-sign-compare -Wno-missing-field-initializers" and so fs/ubifs/key.h give lots (~10) of these every time: CC fs/ubifs/tnc_misc.o In file included from fs/ubifs/ubifs.h:1725, from fs/ubifs/tnc_misc.c:30: fs/ubifs/key.h: In function 'key_r5_hash': fs/ubifs/key.h:64: warning: comparison of unsigned expression >= 0 is always true fs/ubifs/key.h: In function 'key_test_hash': fs/ubifs/key.h:81: warning: comparison of unsigned expression >= 0 is always true This patch fixes the warnings. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * | | UBIFS: introduce compression mount optionsArtem Bityutskiy2008-12-034-16/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is very handy to be able to change default UBIFS compressor via mount options. Introduce -o compr=<name> mount option support. Currently only "none", "lzo" and "zlib" compressors are supported. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>