- 01 8月, 2013 1 次提交
-
-
由 Jan Kara 提交于
Change all function used in filesystem discovery during mount to user standard kernel return values - -errno on error, 0 on success instead of 1 on failure and 0 on success. This allows us to pass error number (not just failure / success) so we can abort device scanning earlier in case of errors like EIO or ENOMEM . Also we will be able to return EROFS in case writeable mount is requested but writing isn't supported. Signed-off-by: NJan Kara <jack@suse.cz>
-
- 11 3月, 2013 1 次提交
-
-
由 Eric W. Biederman 提交于
Somehow I failed to add the MODULE_ALIAS_FS for cifs, hostfs, hpfs, squashfs, and udf despite what I thought were my careful checks :( Add them now. Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
-
- 06 2月, 2013 2 次提交
-
-
由 Jan Kara 提交于
s_extLength was assigned to but the value was never really used. So just remove the field. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
struct udf_bitmap has array of buffer pointers attached to it. The code unnecessarily used s_block_bitmap as a pointer to the array instead of the standard trick of using 0 length array in the declaration. Change that to make code more readable and actually shrink the structure by one pointer. Signed-off-by: NJan Kara <jack@suse.cz>
-
- 22 1月, 2013 1 次提交
-
-
由 Namjae Jeon 提交于
This patch implements extent caching in case of file reading. While reading a file, currently, UDF reads metadata serially which takes a lot of time depending on the number of extents present in the file. Caching last accessd extent improves metadata read time. Instead of reading file metadata from start, now we read from the cached extent. This patch considerably improves the time spent by CPU in kernel mode. For example, while reading a 10.9 GB file using dd: Time before applying patch: 11677022208 bytes (10.9GB) copied, 1529.748921 seconds, 7.3MB/s real 25m 29.85s user 0m 12.41s sys 15m 34.75s Time after applying patch: 11677022208 bytes (10.9GB) copied, 1469.338231 seconds, 7.6MB/s real 24m 29.44s user 0m 15.73s sys 3m 27.61s [JK: Fix bh refcounting issues, simplify initialization] Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NAshish Sangwan <a.sangwan@samsung.com> Signed-off-by: NBonggil Bak <bgbak@samsung.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 21 1月, 2013 1 次提交
-
-
由 Jan Kara 提交于
So far we just marked the buffer as dirty and left writing on flusher thread but especially on opening that opens possible race window where we could write other modified fs structures to disk before we mark filesystem as open. So sync LVID buffer to disk after opening and closing fs. Reported-by: NSteve Nickel <snickel58@gmail.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 15 1月, 2013 1 次提交
-
-
由 Namjae Jeon 提交于
This patch fixes a regression caused by commit bff943af "udf: Fix memory leak when mounting" due to which it was triggering a kernel null point dereference in case of interrupted mount OR when allocating memory to sbi->s_partmaps failed in function udf_sb_alloc_partition_maps. Reported-and-tested-by: NJames Hogan <james@albanarts.com> Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NAshish Sangwan <a.sangwan@samsung.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 03 10月, 2012 1 次提交
-
-
由 Kirill A. Shutemov 提交于
There's no reason to call rcu_barrier() on every deactivate_locked_super(). We only need to make sure that all delayed rcu free inodes are flushed before we destroy related cache. Removing rcu_barrier() from deactivate_locked_super() affects some fast paths. E.g. on my machine exit_group() of a last process in IPC namespace takes 0.07538s. rcu_barrier() takes 0.05188s of that time. Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 21 9月, 2012 1 次提交
-
-
由 Eric W. Biederman 提交于
Cc: Jan Kara <jack@suse.cz> Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
-
- 15 8月, 2012 2 次提交
-
-
由 Nikola Pajkovsky 提交于
In case we detect a problem and bail out, we fail to set "ret" to a nonzero value, and udf_load_logicalvol will mistakenly report success. Signed-off-by: NNikola Pajkovsky <npajkovs@redhat.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Ashish Sangwan 提交于
If s_lvid_bh is not freed and set to NULL before re-scanning partition with default block size, we might end up using wrong lvid in case s_lvid_bh is not updated in udf_load_logicalvolint during rescan. Signed-off-by: NAshish Sangwan <ashish.sangwan2@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@gmail.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 11 7月, 2012 1 次提交
-
-
由 Jan Kara 提交于
When a partition table length is corrupted to be close to 1 << 32, the check for its length may overflow on 32-bit systems and we will think the length is valid. Later on the kernel can crash trying to read beyond end of buffer. Fix the check to avoid possible overflow. CC: stable@vger.kernel.org Reported-by: NBen Hutchings <ben@decadent.org.uk> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 09 7月, 2012 2 次提交
-
-
由 Jan Kara 提交于
When we are mounting filesystem, we can load one partition table before finding out that we cannot complete processing of logical volume descriptor and trying the reserve descriptor. Free the table properly before trying the reserve descriptor. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Artem Bityutskiy 提交于
The UDF file-system does not need the 's_dirt' superblock flag because it does not define the 'write_super()' method. This flag was set to 1 in few places and set to 0 in '->sync_fs()' and was basically useless. Stop using it because it is on its way out. Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 29 6月, 2012 3 次提交
-
-
由 Jan Kara 提交于
Add sanity checks when loading sparing table from disk to avoid accessing unallocated memory or writing to it. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
Check provided length of partition table so that (possibly maliciously) corrupted partition table cannot cause accessing data beyond current buffer. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
Signed-off-by: NJan Kara <jack@suse.cz>
-
- 21 3月, 2012 2 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
由 Al Viro 提交于
New field of struct super_block - ->s_max_links. Maximal allowed value of ->i_nlink or 0; in the latter case all checks still need to be done in ->link/->mkdir/->rename instances. Note that this limit applies both to directoris and to non-directories. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 01 3月, 2012 1 次提交
-
-
由 Joe Perches 提交于
Per call site OOM messages are unnecessary. k.alloc and v.alloc failures use dump_stack(). Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 09 1月, 2012 1 次提交
-
-
由 Jan Kara 提交于
When we hit EIO while writing LVID, the buffer uptodate bit is cleared. This then results in an anoying warning from mark_buffer_dirty() when we write the buffer again. So just set uptodate flag unconditionally. Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 07 1月, 2012 1 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 04 1月, 2012 2 次提交
-
-
由 Al Viro 提交于
note re mount options: fmask and dmask are explicitly truncated to 12bit, UDF_INVALID_MODE just needs to be guaranteed to differ from any such value. And umask is used only in &= with umode_t, so we ignore other bits anyway. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
由 Al Viro 提交于
Seeing that just about every destructor got that INIT_LIST_HEAD() copied into it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once(); the cost of taking it into inode_init_always() will be negligible for pipes and sockets and negative for everything else. Not to mention the removal of boilerplate code from ->destroy_inode() instances... Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 01 11月, 2011 5 次提交
-
-
由 Jan Kara 提交于
Use simple ->s_flags variable instead of u8 variable for each flag. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Namjae Jeon 提交于
It is not necessary to load mirror metadata FE when metadata FE is OK. So try to read it only the first time udf_get_pblock_meta25() fails to map the block from metadata FE. Signed-off-by: NAshish Sangwan <ashishsangwan2@gmail.com> Signed-off-by: NNamjae Jeon <linkinjeon@gmail.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Joe Perches 提交于
Just whitespace and argument alignment. Introduce some checkpatch warnings that deserve to be ignored. Reviewed-by: NNamJae Jeon <linkinjeon@gmail.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Joe Perches 提交于
Use %pV and remove a static buffer to save some text space and fix possible issues when several processes call error reporting function in parallel. Also change error level from KERN_CRIT to KERN_ERR. Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Joe Perches 提交于
Use the current logging styles. Convert a few printks that should have been udf_warn and udf_err. Coalesce formats. Add #define pr_fmt. Move an #include "udfdecls.h" above other includes in udftime.c so pr_fmt works correctly. Strip prefixes from conversions as appropriate. Reorder logging definitions in udfdecl.h Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 11 10月, 2011 3 次提交
-
-
由 Joe Perches 提交于
Rename udf_warning to udf_warn for consistency with normal logging uses of pr_warn. Rename function udf_warning to _udf_warn. Remove __func__ from uses and move __func__ to a new udf_warn macro that calls _udf_warn. Add \n's to uses of udf_warn, remove \n from _udf_warn. Coalesce formats. Reviewed-by: NNamJae Jeon <linkinjeon@gmail.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Joe Perches 提交于
Rename udf_error to udf_err for consistency with normal logging uses of pr_err. Rename function udf_err to _udf_err. Remove __func__ from uses and move __func__ to a new udf_err macro that calls _udf_err. Some of the udf_error uses had \n terminations, some did not so standardize \n's to udf_err uses, remove \n from _udf_err function. Coalesce udf_err formats. One message prefixed with udf_read_super is now prefixed with udf_fill_super. Reviewed-by: NNamJae Jeon <linkinjeon@gmail.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Joe Perches 提交于
If there is a problem with a scratched disc or loader, it's valuable to know which error occurred. Convert some debug messages to udf_error, neaten those messages too. Add the calculated tag checksum and the read checksum to error message. Make udf_error a public function and move the logging prototypes together. Original-patch-by: NNamJae Jeon <linkinjeon@gmail.com> Reviewed-by: NNamJae Jeon <linkinjeon@gmail.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 07 1月, 2011 8 次提交
-
-
由 Nick Piggin 提交于
RCU free the struct inode. This will allow: - Subsequent store-free path walking patch. The inode must be consulted for permissions when walking, so an RCU inode reference is a must. - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want to take i_lock no longer need to take sb_inode_list_lock to walk the list in the first place. This will simplify and optimize locking. - Could remove some nested trylock loops in dcache code - Could potentially simplify things a bit in VM land. Do not need to take the page lock to follow page->mapping. The downsides of this is the performance cost of using RCU. In a simple creat/unlink microbenchmark, performance drops by about 10% due to inability to reuse cache-hot slab objects. As iterations increase and RCU freeing starts kicking over, this increases to about 20%. In cases where inode lifetimes are longer (ie. many inodes may be allocated during the average life span of a single inode), a lot of this cache reuse is not applicable, so the regression caused by this patch is smaller. The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU, however this adds some complexity to list walking and store-free path walking, so I prefer to implement this at a later date, if it is shown to be a win in real situations. I haven't found a regression in any non-micro benchmark so I doubt it will be a problem. Signed-off-by: NNick Piggin <npiggin@kernel.dk>
-
由 Alessio Igor Bogani 提交于
The udf_readdir(), udf_lookup(), udf_create(), udf_mknod(), udf_mkdir(), udf_rmdir(), udf_link(), udf_get_parent() and udf_unlink() seems already adequately protected by i_mutex held by VFS invoking calls. The udf_rename() instead should be already protected by lock_rename again by VFS. The udf_ioctl(), udf_fill_super() and udf_evict_inode() don't requires any further protection. This work was supported by a hardware donation from the CE Linux Forum. Signed-off-by: NAlessio Igor Bogani <abogani@texware.it> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Alessio Igor Bogani 提交于
Replace bkl with the UDF_I(inode)->i_data_sem rw semaphore in udf_release_file(), udf_symlink(), udf_symlink_filler(), udf_get_block(), udf_block_map(), and udf_setattr(). The rule now is that any operation on regular file's or symlink's extents (or generally allocation information including goal block) needs to hold i_data_sem. This work was supported by a hardware donation from the CE Linux Forum. Signed-off-by: NAlessio Igor Bogani <abogani@texware.it> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
udf_count_free_bitmap() does not need BKL because bitmaps are in a fixed place on disk and so we can count set bits without serialization. udf_count_free_table() is now protected by s_alloc_mutex instead of BKL to get a consistent view of free space extents. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
udf_put_super() does not need BKL because the filesystem is shut down so there's nothing to race with. The credential changes in udf_remount_fs() and LVID changes are now protected by dedicated locks so we can remove BKL from this function as well. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
Superblock carries credentials (uid, gid, etc.) which are used as default values in __udf_read_inode() when media does not provide these. These credentials can change during remount so we protect them by a rwlock so that each inode gets a consistent set of credentials. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
udf_open_lvid() and udf_close_lvid() were modifying LVID without s_alloc_mutex. Since they can be called from remount, the modification could race with other filesystem modifications of LVID so protect them by s_alloc_mutex just to be sure. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
uniqueID handling has been duplicated in three places. Move it into a common helper. Since we modify an LVID buffer with uniqueID update, we take sbi->s_alloc_mutex to protect agaist other modifications of the structure. Signed-off-by: NJan Kara <jack@suse.cz>
-