09 May, 2008
1 commit
-
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
udf: Fix memory corruption when fs mounted with noadinicb option
udf: Make udf exportable
udf: fs/udf/partition.c:udf_get_pblock() mustn't be inline
07 May, 2008
2 commits
-
When UDF filesystem is mounted with noadinicb mount option, it
happens that we extend an empty directory with a block. A code in
udf_add_entry() didn't count with this possibility and used
uninitialized data leading to memory and filesystem corruption.
Add a check whether file already has some extents before operating
on them.Signed-off-by: Jan Kara
-
Cc: Christoph Hellwig
Signed-off-by: Rasmus Rohde
Signed-off-by: Jan Kara
30 Apr, 2008
1 commit
-
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Apr, 2008
1 commit
-
This patch fixes the following build error with UML and gcc 4.3:
...
CC fs/udf/partition.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/udf/partition.c: In function ‘udf_get_pblock_virt15’:
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/udf/partition.c:32: sorry, unimplemented: inlining failed in call to ‘udf_get_pblock’: function body not available
/home/bunk/linux/kernel-2.6/git/linux-2.6/fs/udf/partition.c:102: sorry, unimplemented: called from here
make[3]: *** [fs/udf/partition.o] Error 1Signed-off-by: Adrian Bunk
Signed-off-by: Jan Kara
28 Apr, 2008
1 commit
-
Let's use bsize instead.
fs/udf/namei.c:960:12: warning: symbol 'elen' shadows an earlier one
fs/udf/namei.c:937:15: originally declared hereSigned-off-by: Harvey Harrison
Cc: Jan Kara
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Apr, 2008
34 commits
-
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
Cc: Sergey Vlasov
Signed-off-by: Jan Kara -
Fix two compilation warnings (and actual bugs in message formatting)
when UDF debugging is turned on.Signed-off-by: Sebastian Manciulea
Signed-off-by: Jan Kara -
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
Signed-off-by: Jan Kara -
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
and Mircea Fedoreanu .Signed-off-by: Sebastian Manciulea
Signed-off-by: Mircea Fedoreanu
Signed-off-by: Jan Kara -
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
Signed-off-by: Jan Kara -
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
-
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
-
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
-
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
-
Some of the computed positions of anchor block could be beyond the end of
device. Skip reading such blocks.Signed-off-by: Jan Kara
-
Add +1 and -1 to a list of blocks which can be the
real last recorded block on a UDF media. Sebastian Manciulea
claims this helps some drive + media combinations
he is able to test.Signed-off-by: Jan Kara
-
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
-
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
-
Signed-off-by: Jan Kara
-
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
-
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
-
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
Signed-off-by: Pavel Emelyanov
Cc: Max Lyadvinsky
Cc: Vladimir Simonov
Cc: Andrew Neporada
Cc: Kirill Korotaev
Signed-off-by: Jan Kara -
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
-
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
-
Mark udf_process_sequence() as noinline since stack usage is terrible
otherwise.Signed-off-by: Jan Kara
-
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
Signed-off-by: Jan Kara -
remove now unneeded kernel_timestamp type with conversion functions
Signed-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
* 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_stampSigned-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
Signed-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
Signed-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
block cannot be less than 0, because it's sector_t,
so remove unneeded checksSigned-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
replace handwritten bits counting with bitmap_weight
Signed-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
- 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_infoSigned-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
- 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 blocksSigned-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
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 patchSigned-off-by: Marcin Slusarz
-
Signed-off-by: Marcin Slusarz
Cc: Jan Kara
Signed-off-by: Jan Kara -
- remove one indentation level by little code reorganization
- convert "if (smth) BUG();" to "BUG_ON(smth);"Signed-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
- constify internal crc table
- mark udf_crc "in" parameter as constSigned-off-by: Marcin Slusarz
Signed-off-by: Jan Kara -
- fix error handling - always zero output variable
- don't zero explicitely fields zeroed by memset
- mark "in" paramater as constSigned-off-by: Marcin Slusarz
Signed-off-by: Jan Kara