aboutsummaryrefslogtreecommitdiff
path: root/fs/udf/udfdecl.h
AgeCommit message (Collapse)AuthorFilesLines
2013-01-22udf: add extent cache support in case of file readingNamjae Jeon1-5/+0
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: Namjae Jeon <[email protected]> Signed-off-by: Ashish Sangwan <[email protected]> Signed-off-by: Bonggil Bak <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-07-09udf: stop using s_dirtArtem Bityutskiy1-1/+0
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: Artem Bityutskiy <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2012-01-03udf: propagate umode_tAl Viro1-1/+1
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: Al Viro <[email protected]>
2011-11-02Merge branch 'for_linus' of ↵Linus Torvalds1-13/+22
git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: Cleanup metadata flags handling udf: Skip mirror metadata FE loading when metadata FE is ok ext3: Allow quota file use root reservation udf: Remove web reference from UDF MAINTAINERS entry quota: Drop path reference on error exit from quotactl udf: Neaten udf_debug uses udf: Neaten logging output, use vsprintf extension %pV udf: Convert printks to pr_<level> udf: Rename udf_warning to udf_warn udf: Rename udf_error to udf_err udf: Promote some debugging messages to udf_error ext3: Remove the obsolete broken EXT3_IOC32_WAIT_FOR_READONLY. udf: Add readpages support for udf. ext3/balloc.c: local functions should be static ext2: fix the outdated comment in ext2_nfs_get_inode() ext3: remove deprecated oldalloc fs/ext3/balloc.c: delete useless initialization fs/ext2/balloc.c: delete useless initialization ext3: fix message in ext3_remount for rw-remount case ext3: Remove i_mutex from ext3_sync_file() Fix up trivial (printf format cleanup) conflicts in fs/udf/udfdecl.h
2011-10-31treewide: use __printf not __attribute__((format(printf,...)))Joe Perches1-2/+2
Standardize the style for compiler based printf format verification. Standardized the location of __printf too. Done via script and a little typing. $ grep -rPl --include=*.[ch] -w "__attribute__" * | \ grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \ xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }' [[email protected]: revert arch bits] Signed-off-by: Joe Perches <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-10-31udf: Skip mirror metadata FE loading when metadata FE is okNamjae Jeon1-0/+2
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: Ashish Sangwan <[email protected]> Signed-off-by: Namjae Jeon <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-10-31udf: Convert printks to pr_<level>Joe Perches1-19/+19
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: Joe Perches <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-10-10udf: Rename udf_warning to udf_warnJoe Perches1-1/+4
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: NamJae Jeon <[email protected]> Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-10-10udf: Rename udf_error to udf_errJoe Perches1-3/+4
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: NamJae Jeon <[email protected]> Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-10-10udf: Promote some debugging messages to udf_errorJoe Perches1-2/+7
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: NamJae Jeon <[email protected]> Reviewed-by: NamJae Jeon <[email protected]> Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2011-02-23udf: Convert UDF to new truncate calling sequenceJan Kara1-7/+5
Use new truncation sequence in UDF and fix up error handling in the code. Signed-off-by: Jan Kara <[email protected]>
2011-01-06udf: Move handling of uniqueID into a helper function and protect it by a ↵Jan Kara1-0/+1
s_alloc_mutex 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: Jan Kara <[email protected]>
2011-01-06udf: Remove BKL from udf_update_inodeJan Kara1-1/+0
udf_update_inode() does not need BKL since on-disk inode modifications are protected by the buffer lock and reading of values of in-memory inode is safe without any lock. In some cases we can write inconsistent inode state to disk but in that case inode will be marked dirty and overwritten later. Also make unnecessarily global udf_sync_inode() static. Signed-off-by: Jan Kara <[email protected]>
2011-01-06fs/udf: Add printf format/argument verificationJoe Perches1-0/+2
Add __attribute__((format... to udf_warning. All arguments matched formats, no other changes necessary. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2010-08-09switch udf to ->evict_inode()Al Viro1-2/+1
Signed-off-by: Al Viro <[email protected]>
2010-05-24udf: Remove dead quota codeJan Kara1-1/+0
Quota on UDF is non-functional at least since 2.6.16 (I'm too lazy to do more archeology) because it does not provide .quota_write and .quota_read functions and thus quotaon(8) just returns EINVAL. Since nobody complained for all those years and quota support is not even in UDF standard just nuke it. Signed-off-by: Jan Kara <[email protected]>
2010-05-05udf: BKL ioctl pushdownJohn Kacur1-2/+1
Convert udf_ioctl to an unlocked_ioctl and push the BKL down into it. Signed-off-by: John Kacur <[email protected] Signed-off-by: Jan Kara <[email protected]>
2010-04-08udf: add speciffic ->setattr callbackDmitry Monakhov1-1/+2
generic setattr not longer responsible for quota transfer. use udf_setattr for all udf's inodes. Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2010-03-05pass writeback_control to ->write_inodeChristoph Hellwig1-1/+1
This gives the filesystem more information about the writeback that is happening. Trond requested this for the NFS unstable write handling, and other filesystems might benefit from this too by beeing able to distinguish between the different callers in more detail. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
2009-06-11switch udf to simple_fsync()Al Viro1-3/+0
Signed-off-by: Al Viro <[email protected]>
2009-04-02udf: Don't write integrity descriptor too oftenJan Kara1-0/+11
We update information in logical volume integrity descriptor after each allocation (as LVID contains free space, number of directories and files on disk etc.). If the filesystem is on some phase change media, this leads to its quick degradation as such media is able to handle only 10000 overwrites or so. We solve the problem by writing new information into LVID only on umount, remount-ro and sync. This solves the problem at the price of longer media inconsistency (previously media became consistent after pdflush flushed dirty LVID buffer) but that should be acceptable. Report by and patch written in cooperation with Rich Coe <[email protected]>. Signed-off-by: Jan Kara <[email protected]>
2009-04-02Fix the udf code not to pass structs on stack where possible.Pekka Enberg1-7/+13
Signed-off-by: Pekka Enberg <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2009-04-02Remove struct typedefs from fs/udf/ecma_167.h et al.Pekka Enberg1-18/+18
Signed-off-by: Pekka Enberg <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-06-16udf: restore UDFFS_DEBUG to being undefined by defaultPaul Collins1-1/+1
Commit 706047a79725b585cf272fdefc234b31b6545c72, "udf: Fix compilation warnings when UDF debug is on" inadvertently (I assume) enabled debugging messages by default for UDF. This patch disables them again. Signed-off-by: Paul Collins <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-05-07udf: Make udf exportableRasmus Rohde1-0/+1
Cc: Christoph Hellwig <[email protected]> Signed-off-by: Rasmus Rohde <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17udf: use crc_itu_t from lib instead of udf_crcBob Copeland1-3/+0
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 <[email protected]> Cc: Sergey Vlasov <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17udf: Fix compilation warnings when UDF debug is onSebastian Manciulea1-1/+1
Fix two compilation warnings (and actual bugs in message formatting) when UDF debugging is turned on. Signed-off-by: Sebastian Manciulea <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17udf: Add read-only support for 2.50 UDF mediaJan Kara1-0/+2
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 <[email protected]> and Mircea Fedoreanu <[email protected]>. Signed-off-by: Sebastian Manciulea <[email protected]> Signed-off-by: Mircea Fedoreanu <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17udf: convert udf_stamp_to_time and udf_time_to_stamp to use timestampsMarcin Slusarz1-2/+3
* 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 <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17udf: convert udf_stamp_to_time to return struct timespec[email protected]1-2/+2
Signed-off-by: Marcin Slusarz <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17udf: replace udf_*_offset macros with functions[email protected]1-10/+19
- 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 <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17udf: constify crc[email protected]1-1/+1
- constify internal crc table - mark udf_crc "in" parameter as const Signed-off-by: Marcin Slusarz <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17udf: udf_CS0toUTF8 cleanup[email protected]1-1/+1
- fix error handling - always zero output variable - don't zero explicitely fields zeroed by memset - mark "in" paramater as const - remove outdated comment Signed-off-by: Marcin Slusarz <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17make udf_error() staticAdrian Bunk1-1/+0
This patch makes the needlessly global udf_error() static. Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-04-17udf: move headers out include/linux/Christoph Hellwig1-3/+22
There's really no reason to keep udf headers in include/linux as they're not used by anything but fs/udf/. This patch merges most of include/linux/udf_fs_i.h into fs/udf/udf_i.h, include/linux/udf_fs_sb.h into fs/udf/udf_sb.h and include/linux/udf_fs.h into fs/udf/udfdecl.h. The only thing remaining in include/linux/ is a stub of udf_fs_i.h defining the four user-visible udf ioctls. It's also moved from unifdef-y to headers-y because it can be included unconditionally now. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]>
2008-02-08udf: fix 3 signedness & 1 unitialized variable warningsMarcin Slusarz1-2/+2
sparse generated: fs/udf/inode.c:324:41: warning: incorrect type in argument 4 (different signedness) fs/udf/inode.c:324:41: expected long *<noident> fs/udf/inode.c:324:41: got unsigned long *<noident> inode_getblk always set 4th argument to uint32_t value 3rd parameter of map_bh is sector_t (which is unsigned long or u64) so convert phys value to sector_t fs/udf/inode.c:1818:47: warning: incorrect type in argument 3 (different signedness) fs/udf/inode.c:1818:47: expected int *<noident> fs/udf/inode.c:1818:47: got unsigned int *<noident> fs/udf/inode.c:1826:46: warning: incorrect type in argument 3 (different signedness) fs/udf/inode.c:1826:46: expected int *<noident> fs/udf/inode.c:1826:46: got unsigned int *<noident> udf_get_filelongad and udf_get_shortad are called always for uint32_t values (struct extent_position->offset), so it's safe to convert offset parameter to uint32_t gcc warned: fs/udf/inode.c: In function 'udf_get_block': fs/udf/inode.c:299: warning: 'phys' may be used uninitialized in this function initialize it to 0 (if someday someone will break inode_getblk we will catch it immediately) Signed-off-by: Marcin Slusarz <[email protected]> Cc: Ben Fennema <[email protected]> Acked-by: Jan Kara <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-08udf: remove UDF_I_* macros and open code themMarcin Slusarz1-4/+4
Signed-off-by: Marcin Slusarz <[email protected]> Acked-by: Jan Kara <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-08udf: create common function for tag checksummingMarcin Slusarz1-0/+3
Signed-off-by: Marcin Slusarz <[email protected]> Acked-by: Jan Kara <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-21UDF: coding style conversion - lindent fixupsCyrill Gorcunov1-2/+2
This patch fixes up sources after conversion by Lindent. Signed-off-by: Cyrill Gorcunov <[email protected]> Cc: Jan Kara <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-07-19UDF: coding style conversion - lindentCyrill Gorcunov1-41/+65
This patch converts UDF coding style to kernel coding style using Lindent. Signed-off-by: Cyrill Gorcunov <[email protected]> Cc: Jan Kara <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-06-16udf: fix possible leakage of blocksJan Kara1-0/+1
We have to take care that when we call udf_discard_prealloc() from udf_clear_inode() we have to write inode ourselves afterwards (otherwise, some changes might be lost leading to leakage of blocks, use of free blocks or improperly aligned extents). Also udf_discard_prealloc() does two different things - it removes preallocated blocks and truncates the last extent to exactly match i_size. We move the latter functionality to udf_truncate_tail_extent(), call udf_discard_prealloc() when last reference to a file is dropped and call udf_truncate_tail_extent() when inode is being removed from inode cache (udf_clear_inode() call). We cannot call udf_truncate_tail_extent() earlier as subsequent open+write would find the last block of the file mapped and happily write to the end of it, although the last extent says it's shorter. [[email protected]: Make checkpatch.pl happier] Signed-off-by: Jan Kara <[email protected]> Cc: Eric Sandeen <[email protected]> Cc: Cyrill Gorcunov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-05-08udf: use get_bh()Jan Kara1-1/+1
Make UDF use get_bh() instead of directly accessing b_count and use brelse() instead of udf_release_data() which does just brelse()... Signed-off-by: Jan Kara <[email protected]> Acked-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-05-08UDF: introduce struct extent_positionJan Kara1-7/+14
Introduce a structure extent_position to store a position of an extent and the corresponding buffer_head in one place. Signed-off-by: Jan Kara <[email protected]> Acked-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-05-08udf: use sector_t and loff_t for file offsetsJan Kara1-3/+3
Use sector_t and loff_t for file offsets in UDF filesystem. Otherwise an overflow may occur for long files. Also make inode_bmap() return offset in the extent in number of blocks instead of number of bytes - for most callers this is more convenient. Signed-off-by: Jan Kara <[email protected]> Acked-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2007-02-12[PATCH] mark struct inode_operations const 3Arjan van de Ven1-2/+2
Many struct inode_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <[email protected]> Signed-off-by: Adrian Bunk <[email protected]>
2006-06-28[PATCH] mark address_space_operations constChristoph Hellwig1-3/+3
Same as with already do with the file operations: keep them in .rodata and prevents people from doing runtime patching. Signed-off-by: Christoph Hellwig <[email protected]> Cc: Steven French <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-03-28[PATCH] Make most file operations structs in fs/ constArjan van de Ven1-2/+2
This is a conversion to make the various file_operations structs in fs/ const. Basically a regexp job, with a few manual fixups The goal is both to increase correctness (harder to accidentally write to shared datastructures) and reducing the false sharing of cachelines with things that get dirty in .data (while .rodata is nicely read only and thus cache clean) Signed-off-by: Arjan van de Ven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+167
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!