Merge branch 'for_linus' of 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
This commit is contained in:
Коммит
34116645d9
|
@ -73,14 +73,6 @@ nobarrier (*) This also requires an IO stack which can support
|
||||||
also be used to enable or disable barriers, for
|
also be used to enable or disable barriers, for
|
||||||
consistency with other ext3 mount options.
|
consistency with other ext3 mount options.
|
||||||
|
|
||||||
orlov (*) This enables the new Orlov block allocator. It is
|
|
||||||
enabled by default.
|
|
||||||
|
|
||||||
oldalloc This disables the Orlov block allocator and enables
|
|
||||||
the old block allocator. Orlov should have better
|
|
||||||
performance - we'd like to get some feedback if it's
|
|
||||||
the contrary for you.
|
|
||||||
|
|
||||||
user_xattr Enables Extended User Attributes. Additionally, you
|
user_xattr Enables Extended User Attributes. Additionally, you
|
||||||
need to have extended attribute support enabled in the
|
need to have extended attribute support enabled in the
|
||||||
kernel configuration (CONFIG_EXT3_FS_XATTR). See the
|
kernel configuration (CONFIG_EXT3_FS_XATTR). See the
|
||||||
|
|
|
@ -6683,7 +6683,6 @@ F: drivers/net/ethernet/8390/ne-h8300.c
|
||||||
|
|
||||||
UDF FILESYSTEM
|
UDF FILESYSTEM
|
||||||
M: Jan Kara <jack@suse.cz>
|
M: Jan Kara <jack@suse.cz>
|
||||||
W: http://linux-udf.sourceforge.net
|
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/filesystems/udf.txt
|
F: Documentation/filesystems/udf.txt
|
||||||
F: fs/udf/
|
F: fs/udf/
|
||||||
|
|
|
@ -421,7 +421,7 @@ static inline int rsv_is_empty(struct ext2_reserve_window *rsv)
|
||||||
void ext2_init_block_alloc_info(struct inode *inode)
|
void ext2_init_block_alloc_info(struct inode *inode)
|
||||||
{
|
{
|
||||||
struct ext2_inode_info *ei = EXT2_I(inode);
|
struct ext2_inode_info *ei = EXT2_I(inode);
|
||||||
struct ext2_block_alloc_info *block_i = ei->i_block_alloc_info;
|
struct ext2_block_alloc_info *block_i;
|
||||||
struct super_block *sb = inode->i_sb;
|
struct super_block *sb = inode->i_sb;
|
||||||
|
|
||||||
block_i = kmalloc(sizeof(*block_i), GFP_NOFS);
|
block_i = kmalloc(sizeof(*block_i), GFP_NOFS);
|
||||||
|
|
|
@ -327,10 +327,10 @@ static struct inode *ext2_nfs_get_inode(struct super_block *sb,
|
||||||
if (ino > le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count))
|
if (ino > le32_to_cpu(EXT2_SB(sb)->s_es->s_inodes_count))
|
||||||
return ERR_PTR(-ESTALE);
|
return ERR_PTR(-ESTALE);
|
||||||
|
|
||||||
/* iget isn't really right if the inode is currently unallocated!!
|
/*
|
||||||
* ext2_read_inode currently does appropriate checks, but
|
* ext2_iget isn't quite right if the inode is currently unallocated!
|
||||||
* it might be "neater" to call ext2_get_inode first and check
|
* However ext2_iget currently does appropriate checks to handle stale
|
||||||
* if the inode is valid.....
|
* inodes so everything is OK.
|
||||||
*/
|
*/
|
||||||
inode = ext2_iget(sb, ino);
|
inode = ext2_iget(sb, ino);
|
||||||
if (IS_ERR(inode))
|
if (IS_ERR(inode))
|
||||||
|
|
|
@ -427,7 +427,7 @@ static inline int rsv_is_empty(struct ext3_reserve_window *rsv)
|
||||||
void ext3_init_block_alloc_info(struct inode *inode)
|
void ext3_init_block_alloc_info(struct inode *inode)
|
||||||
{
|
{
|
||||||
struct ext3_inode_info *ei = EXT3_I(inode);
|
struct ext3_inode_info *ei = EXT3_I(inode);
|
||||||
struct ext3_block_alloc_info *block_i = ei->i_block_alloc_info;
|
struct ext3_block_alloc_info *block_i;
|
||||||
struct super_block *sb = inode->i_sb;
|
struct super_block *sb = inode->i_sb;
|
||||||
|
|
||||||
block_i = kmalloc(sizeof(*block_i), GFP_NOFS);
|
block_i = kmalloc(sizeof(*block_i), GFP_NOFS);
|
||||||
|
@ -1440,14 +1440,14 @@ out:
|
||||||
*
|
*
|
||||||
* Check if filesystem has at least 1 free block available for allocation.
|
* Check if filesystem has at least 1 free block available for allocation.
|
||||||
*/
|
*/
|
||||||
static int ext3_has_free_blocks(struct ext3_sb_info *sbi)
|
static int ext3_has_free_blocks(struct ext3_sb_info *sbi, int use_reservation)
|
||||||
{
|
{
|
||||||
ext3_fsblk_t free_blocks, root_blocks;
|
ext3_fsblk_t free_blocks, root_blocks;
|
||||||
|
|
||||||
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
|
free_blocks = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
|
||||||
root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
|
root_blocks = le32_to_cpu(sbi->s_es->s_r_blocks_count);
|
||||||
if (free_blocks < root_blocks + 1 && !capable(CAP_SYS_RESOURCE) &&
|
if (free_blocks < root_blocks + 1 && !capable(CAP_SYS_RESOURCE) &&
|
||||||
sbi->s_resuid != current_fsuid() &&
|
!use_reservation && sbi->s_resuid != current_fsuid() &&
|
||||||
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
|
(sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1468,7 +1468,7 @@ static int ext3_has_free_blocks(struct ext3_sb_info *sbi)
|
||||||
*/
|
*/
|
||||||
int ext3_should_retry_alloc(struct super_block *sb, int *retries)
|
int ext3_should_retry_alloc(struct super_block *sb, int *retries)
|
||||||
{
|
{
|
||||||
if (!ext3_has_free_blocks(EXT3_SB(sb)) || (*retries)++ > 3)
|
if (!ext3_has_free_blocks(EXT3_SB(sb), 0) || (*retries)++ > 3)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
jbd_debug(1, "%s: retrying operation after ENOSPC\n", sb->s_id);
|
jbd_debug(1, "%s: retrying operation after ENOSPC\n", sb->s_id);
|
||||||
|
@ -1546,7 +1546,7 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode,
|
||||||
if (block_i && ((windowsz = block_i->rsv_window_node.rsv_goal_size) > 0))
|
if (block_i && ((windowsz = block_i->rsv_window_node.rsv_goal_size) > 0))
|
||||||
my_rsv = &block_i->rsv_window_node;
|
my_rsv = &block_i->rsv_window_node;
|
||||||
|
|
||||||
if (!ext3_has_free_blocks(sbi)) {
|
if (!ext3_has_free_blocks(sbi, IS_NOQUOTA(inode))) {
|
||||||
*errp = -ENOSPC;
|
*errp = -ENOSPC;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -1924,9 +1924,10 @@ unsigned long ext3_bg_num_gdb(struct super_block *sb, int group)
|
||||||
* reaches any used block. Then issue a TRIM command on this extent and free
|
* reaches any used block. Then issue a TRIM command on this extent and free
|
||||||
* the extent in the block bitmap. This is done until whole group is scanned.
|
* the extent in the block bitmap. This is done until whole group is scanned.
|
||||||
*/
|
*/
|
||||||
ext3_grpblk_t ext3_trim_all_free(struct super_block *sb, unsigned int group,
|
static ext3_grpblk_t ext3_trim_all_free(struct super_block *sb,
|
||||||
ext3_grpblk_t start, ext3_grpblk_t max,
|
unsigned int group,
|
||||||
ext3_grpblk_t minblocks)
|
ext3_grpblk_t start, ext3_grpblk_t max,
|
||||||
|
ext3_grpblk_t minblocks)
|
||||||
{
|
{
|
||||||
handle_t *handle;
|
handle_t *handle;
|
||||||
ext3_grpblk_t next, free_blocks, bit, freed, count = 0;
|
ext3_grpblk_t next, free_blocks, bit, freed, count = 0;
|
||||||
|
|
|
@ -61,13 +61,6 @@ int ext3_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/*
|
|
||||||
* Taking the mutex here just to keep consistent with how fsync was
|
|
||||||
* called previously, however it looks like we don't need to take
|
|
||||||
* i_mutex at all.
|
|
||||||
*/
|
|
||||||
mutex_lock(&inode->i_mutex);
|
|
||||||
|
|
||||||
J_ASSERT(ext3_journal_current_handle() == NULL);
|
J_ASSERT(ext3_journal_current_handle() == NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -85,7 +78,6 @@ int ext3_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
|
||||||
* safe in-journal, which is all fsync() needs to ensure.
|
* safe in-journal, which is all fsync() needs to ensure.
|
||||||
*/
|
*/
|
||||||
if (ext3_should_journal_data(inode)) {
|
if (ext3_should_journal_data(inode)) {
|
||||||
mutex_unlock(&inode->i_mutex);
|
|
||||||
ret = ext3_force_commit(inode->i_sb);
|
ret = ext3_force_commit(inode->i_sb);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -108,8 +100,6 @@ int ext3_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
|
||||||
*/
|
*/
|
||||||
if (needs_barrier)
|
if (needs_barrier)
|
||||||
blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
|
blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
|
||||||
|
|
||||||
mutex_unlock(&inode->i_mutex);
|
|
||||||
out:
|
out:
|
||||||
trace_ext3_sync_file_exit(inode, ret);
|
trace_ext3_sync_file_exit(inode, ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -177,42 +177,6 @@ error_return:
|
||||||
ext3_std_error(sb, fatal);
|
ext3_std_error(sb, fatal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* There are two policies for allocating an inode. If the new inode is
|
|
||||||
* a directory, then a forward search is made for a block group with both
|
|
||||||
* free space and a low directory-to-inode ratio; if that fails, then of
|
|
||||||
* the groups with above-average free space, that group with the fewest
|
|
||||||
* directories already is chosen.
|
|
||||||
*
|
|
||||||
* For other inodes, search forward from the parent directory\'s block
|
|
||||||
* group to find a free inode.
|
|
||||||
*/
|
|
||||||
static int find_group_dir(struct super_block *sb, struct inode *parent)
|
|
||||||
{
|
|
||||||
int ngroups = EXT3_SB(sb)->s_groups_count;
|
|
||||||
unsigned int freei, avefreei;
|
|
||||||
struct ext3_group_desc *desc, *best_desc = NULL;
|
|
||||||
int group, best_group = -1;
|
|
||||||
|
|
||||||
freei = percpu_counter_read_positive(&EXT3_SB(sb)->s_freeinodes_counter);
|
|
||||||
avefreei = freei / ngroups;
|
|
||||||
|
|
||||||
for (group = 0; group < ngroups; group++) {
|
|
||||||
desc = ext3_get_group_desc (sb, group, NULL);
|
|
||||||
if (!desc || !desc->bg_free_inodes_count)
|
|
||||||
continue;
|
|
||||||
if (le16_to_cpu(desc->bg_free_inodes_count) < avefreei)
|
|
||||||
continue;
|
|
||||||
if (!best_desc ||
|
|
||||||
(le16_to_cpu(desc->bg_free_blocks_count) >
|
|
||||||
le16_to_cpu(best_desc->bg_free_blocks_count))) {
|
|
||||||
best_group = group;
|
|
||||||
best_desc = desc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return best_group;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Orlov's allocator for directories.
|
* Orlov's allocator for directories.
|
||||||
*
|
*
|
||||||
|
@ -436,12 +400,9 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir,
|
||||||
|
|
||||||
sbi = EXT3_SB(sb);
|
sbi = EXT3_SB(sb);
|
||||||
es = sbi->s_es;
|
es = sbi->s_es;
|
||||||
if (S_ISDIR(mode)) {
|
if (S_ISDIR(mode))
|
||||||
if (test_opt (sb, OLDALLOC))
|
group = find_group_orlov(sb, dir);
|
||||||
group = find_group_dir(sb, dir);
|
else
|
||||||
else
|
|
||||||
group = find_group_orlov(sb, dir);
|
|
||||||
} else
|
|
||||||
group = find_group_other(sb, dir);
|
group = find_group_other(sb, dir);
|
||||||
|
|
||||||
err = -ENOSPC;
|
err = -ENOSPC;
|
||||||
|
|
|
@ -150,30 +150,6 @@ setversion_out:
|
||||||
mnt_drop_write(filp->f_path.mnt);
|
mnt_drop_write(filp->f_path.mnt);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_JBD_DEBUG
|
|
||||||
case EXT3_IOC_WAIT_FOR_READONLY:
|
|
||||||
/*
|
|
||||||
* This is racy - by the time we're woken up and running,
|
|
||||||
* the superblock could be released. And the module could
|
|
||||||
* have been unloaded. So sue me.
|
|
||||||
*
|
|
||||||
* Returns 1 if it slept, else zero.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
struct super_block *sb = inode->i_sb;
|
|
||||||
DECLARE_WAITQUEUE(wait, current);
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
set_current_state(TASK_INTERRUPTIBLE);
|
|
||||||
add_wait_queue(&EXT3_SB(sb)->ro_wait_queue, &wait);
|
|
||||||
if (timer_pending(&EXT3_SB(sb)->turn_ro_timer)) {
|
|
||||||
schedule();
|
|
||||||
ret = 1;
|
|
||||||
}
|
|
||||||
remove_wait_queue(&EXT3_SB(sb)->ro_wait_queue, &wait);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
case EXT3_IOC_GETRSVSZ:
|
case EXT3_IOC_GETRSVSZ:
|
||||||
if (test_opt(inode->i_sb, RESERVATION)
|
if (test_opt(inode->i_sb, RESERVATION)
|
||||||
&& S_ISREG(inode->i_mode)
|
&& S_ISREG(inode->i_mode)
|
||||||
|
|
|
@ -652,8 +652,6 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs)
|
||||||
seq_puts(seq, ",nouid32");
|
seq_puts(seq, ",nouid32");
|
||||||
if (test_opt(sb, DEBUG))
|
if (test_opt(sb, DEBUG))
|
||||||
seq_puts(seq, ",debug");
|
seq_puts(seq, ",debug");
|
||||||
if (test_opt(sb, OLDALLOC))
|
|
||||||
seq_puts(seq, ",oldalloc");
|
|
||||||
#ifdef CONFIG_EXT3_FS_XATTR
|
#ifdef CONFIG_EXT3_FS_XATTR
|
||||||
if (test_opt(sb, XATTR_USER))
|
if (test_opt(sb, XATTR_USER))
|
||||||
seq_puts(seq, ",user_xattr");
|
seq_puts(seq, ",user_xattr");
|
||||||
|
@ -1049,10 +1047,12 @@ static int parse_options (char *options, struct super_block *sb,
|
||||||
set_opt (sbi->s_mount_opt, DEBUG);
|
set_opt (sbi->s_mount_opt, DEBUG);
|
||||||
break;
|
break;
|
||||||
case Opt_oldalloc:
|
case Opt_oldalloc:
|
||||||
set_opt (sbi->s_mount_opt, OLDALLOC);
|
ext3_msg(sb, KERN_WARNING,
|
||||||
|
"Ignoring deprecated oldalloc option");
|
||||||
break;
|
break;
|
||||||
case Opt_orlov:
|
case Opt_orlov:
|
||||||
clear_opt (sbi->s_mount_opt, OLDALLOC);
|
ext3_msg(sb, KERN_WARNING,
|
||||||
|
"Ignoring deprecated orlov option");
|
||||||
break;
|
break;
|
||||||
#ifdef CONFIG_EXT3_FS_XATTR
|
#ifdef CONFIG_EXT3_FS_XATTR
|
||||||
case Opt_user_xattr:
|
case Opt_user_xattr:
|
||||||
|
@ -2669,13 +2669,13 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
|
||||||
/*
|
/*
|
||||||
* If we have an unprocessed orphan list hanging
|
* If we have an unprocessed orphan list hanging
|
||||||
* around from a previously readonly bdev mount,
|
* around from a previously readonly bdev mount,
|
||||||
* require a full umount/remount for now.
|
* require a full umount & mount for now.
|
||||||
*/
|
*/
|
||||||
if (es->s_last_orphan) {
|
if (es->s_last_orphan) {
|
||||||
ext3_msg(sb, KERN_WARNING, "warning: couldn't "
|
ext3_msg(sb, KERN_WARNING, "warning: couldn't "
|
||||||
"remount RDWR because of unprocessed "
|
"remount RDWR because of unprocessed "
|
||||||
"orphan inode list. Please "
|
"orphan inode list. Please "
|
||||||
"umount/remount instead.");
|
"umount & mount instead.");
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto restore_opts;
|
goto restore_opts;
|
||||||
}
|
}
|
||||||
|
|
|
@ -363,12 +363,15 @@ SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special,
|
||||||
}
|
}
|
||||||
|
|
||||||
sb = quotactl_block(special);
|
sb = quotactl_block(special);
|
||||||
if (IS_ERR(sb))
|
if (IS_ERR(sb)) {
|
||||||
return PTR_ERR(sb);
|
ret = PTR_ERR(sb);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ret = do_quotactl(sb, type, cmds, id, addr, pathp);
|
ret = do_quotactl(sb, type, cmds, id, addr, pathp);
|
||||||
|
|
||||||
drop_super(sb);
|
drop_super(sb);
|
||||||
|
out:
|
||||||
if (pathp && !IS_ERR(pathp))
|
if (pathp && !IS_ERR(pathp))
|
||||||
path_put(pathp);
|
path_put(pathp);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -59,8 +59,8 @@ static int __load_block_bitmap(struct super_block *sb,
|
||||||
int nr_groups = bitmap->s_nr_groups;
|
int nr_groups = bitmap->s_nr_groups;
|
||||||
|
|
||||||
if (block_group >= nr_groups) {
|
if (block_group >= nr_groups) {
|
||||||
udf_debug("block_group (%d) > nr_groups (%d)\n", block_group,
|
udf_debug("block_group (%d) > nr_groups (%d)\n",
|
||||||
nr_groups);
|
block_group, nr_groups);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bitmap->s_block_bitmap[block_group]) {
|
if (bitmap->s_block_bitmap[block_group]) {
|
||||||
|
@ -126,8 +126,9 @@ static void udf_bitmap_free_blocks(struct super_block *sb,
|
||||||
if (bloc->logicalBlockNum + count < count ||
|
if (bloc->logicalBlockNum + count < count ||
|
||||||
(bloc->logicalBlockNum + count) > partmap->s_partition_len) {
|
(bloc->logicalBlockNum + count) > partmap->s_partition_len) {
|
||||||
udf_debug("%d < %d || %d + %d > %d\n",
|
udf_debug("%d < %d || %d + %d > %d\n",
|
||||||
bloc->logicalBlockNum, 0, bloc->logicalBlockNum,
|
bloc->logicalBlockNum, 0,
|
||||||
count, partmap->s_partition_len);
|
bloc->logicalBlockNum, count,
|
||||||
|
partmap->s_partition_len);
|
||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +156,7 @@ static void udf_bitmap_free_blocks(struct super_block *sb,
|
||||||
if (udf_set_bit(bit + i, bh->b_data)) {
|
if (udf_set_bit(bit + i, bh->b_data)) {
|
||||||
udf_debug("bit %ld already set\n", bit + i);
|
udf_debug("bit %ld already set\n", bit + i);
|
||||||
udf_debug("byte=%2x\n",
|
udf_debug("byte=%2x\n",
|
||||||
((char *)bh->b_data)[(bit + i) >> 3]);
|
((char *)bh->b_data)[(bit + i) >> 3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
udf_add_free_space(sb, sbi->s_partition, count);
|
udf_add_free_space(sb, sbi->s_partition, count);
|
||||||
|
@ -369,7 +370,8 @@ static void udf_table_free_blocks(struct super_block *sb,
|
||||||
if (bloc->logicalBlockNum + count < count ||
|
if (bloc->logicalBlockNum + count < count ||
|
||||||
(bloc->logicalBlockNum + count) > partmap->s_partition_len) {
|
(bloc->logicalBlockNum + count) > partmap->s_partition_len) {
|
||||||
udf_debug("%d < %d || %d + %d > %d\n",
|
udf_debug("%d < %d || %d + %d > %d\n",
|
||||||
bloc->logicalBlockNum, 0, bloc->logicalBlockNum, count,
|
bloc->logicalBlockNum, 0,
|
||||||
|
bloc->logicalBlockNum, count,
|
||||||
partmap->s_partition_len);
|
partmap->s_partition_len);
|
||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,8 +162,8 @@ struct fileIdentDesc *udf_get_fileident(void *buffer, int bufsize, int *offset)
|
||||||
int padlen;
|
int padlen;
|
||||||
|
|
||||||
if ((!buffer) || (!offset)) {
|
if ((!buffer) || (!offset)) {
|
||||||
udf_debug("invalidparms\n, buffer=%p, offset=%p\n", buffer,
|
udf_debug("invalidparms, buffer=%p, offset=%p\n",
|
||||||
offset);
|
buffer, offset);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ struct short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offs
|
||||||
struct short_ad *sa;
|
struct short_ad *sa;
|
||||||
|
|
||||||
if ((!ptr) || (!offset)) {
|
if ((!ptr) || (!offset)) {
|
||||||
printk(KERN_ERR "udf: udf_get_fileshortad() invalidparms\n");
|
pr_err("%s: invalidparms\n", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ struct long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, uint32_t *offset
|
||||||
struct long_ad *la;
|
struct long_ad *la;
|
||||||
|
|
||||||
if ((!ptr) || (!offset)) {
|
if ((!ptr) || (!offset)) {
|
||||||
printk(KERN_ERR "udf: udf_get_filelongad() invalidparms\n");
|
pr_err("%s: invalidparms\n", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include <linux/writeback.h>
|
#include <linux/writeback.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/crc-itu-t.h>
|
#include <linux/crc-itu-t.h>
|
||||||
|
#include <linux/mpage.h>
|
||||||
|
|
||||||
#include "udf_i.h"
|
#include "udf_i.h"
|
||||||
#include "udf_sb.h"
|
#include "udf_sb.h"
|
||||||
|
@ -83,12 +84,10 @@ void udf_evict_inode(struct inode *inode)
|
||||||
end_writeback(inode);
|
end_writeback(inode);
|
||||||
if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB &&
|
if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB &&
|
||||||
inode->i_size != iinfo->i_lenExtents) {
|
inode->i_size != iinfo->i_lenExtents) {
|
||||||
printk(KERN_WARNING "UDF-fs (%s): Inode %lu (mode %o) has "
|
udf_warn(inode->i_sb, "Inode %lu (mode %o) has inode size %llu different from extent length %llu. Filesystem need not be standards compliant.\n",
|
||||||
"inode size %llu different from extent length %llu. "
|
inode->i_ino, inode->i_mode,
|
||||||
"Filesystem need not be standards compliant.\n",
|
(unsigned long long)inode->i_size,
|
||||||
inode->i_sb->s_id, inode->i_ino, inode->i_mode,
|
(unsigned long long)iinfo->i_lenExtents);
|
||||||
(unsigned long long)inode->i_size,
|
|
||||||
(unsigned long long)iinfo->i_lenExtents);
|
|
||||||
}
|
}
|
||||||
kfree(iinfo->i_ext.i_data);
|
kfree(iinfo->i_ext.i_data);
|
||||||
iinfo->i_ext.i_data = NULL;
|
iinfo->i_ext.i_data = NULL;
|
||||||
|
@ -104,7 +103,13 @@ static int udf_writepage(struct page *page, struct writeback_control *wbc)
|
||||||
|
|
||||||
static int udf_readpage(struct file *file, struct page *page)
|
static int udf_readpage(struct file *file, struct page *page)
|
||||||
{
|
{
|
||||||
return block_read_full_page(page, udf_get_block);
|
return mpage_readpage(page, udf_get_block);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int udf_readpages(struct file *file, struct address_space *mapping,
|
||||||
|
struct list_head *pages, unsigned nr_pages)
|
||||||
|
{
|
||||||
|
return mpage_readpages(mapping, pages, nr_pages, udf_get_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int udf_write_begin(struct file *file, struct address_space *mapping,
|
static int udf_write_begin(struct file *file, struct address_space *mapping,
|
||||||
|
@ -139,6 +144,7 @@ static sector_t udf_bmap(struct address_space *mapping, sector_t block)
|
||||||
|
|
||||||
const struct address_space_operations udf_aops = {
|
const struct address_space_operations udf_aops = {
|
||||||
.readpage = udf_readpage,
|
.readpage = udf_readpage,
|
||||||
|
.readpages = udf_readpages,
|
||||||
.writepage = udf_writepage,
|
.writepage = udf_writepage,
|
||||||
.write_begin = udf_write_begin,
|
.write_begin = udf_write_begin,
|
||||||
.write_end = generic_write_end,
|
.write_end = generic_write_end,
|
||||||
|
@ -1169,16 +1175,15 @@ static void __udf_read_inode(struct inode *inode)
|
||||||
*/
|
*/
|
||||||
bh = udf_read_ptagged(inode->i_sb, &iinfo->i_location, 0, &ident);
|
bh = udf_read_ptagged(inode->i_sb, &iinfo->i_location, 0, &ident);
|
||||||
if (!bh) {
|
if (!bh) {
|
||||||
printk(KERN_ERR "udf: udf_read_inode(ino %ld) failed !bh\n",
|
udf_err(inode->i_sb, "(ino %ld) failed !bh\n", inode->i_ino);
|
||||||
inode->i_ino);
|
|
||||||
make_bad_inode(inode);
|
make_bad_inode(inode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ident != TAG_IDENT_FE && ident != TAG_IDENT_EFE &&
|
if (ident != TAG_IDENT_FE && ident != TAG_IDENT_EFE &&
|
||||||
ident != TAG_IDENT_USE) {
|
ident != TAG_IDENT_USE) {
|
||||||
printk(KERN_ERR "udf: udf_read_inode(ino %ld) "
|
udf_err(inode->i_sb, "(ino %ld) failed ident=%d\n",
|
||||||
"failed ident=%d\n", inode->i_ino, ident);
|
inode->i_ino, ident);
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
make_bad_inode(inode);
|
make_bad_inode(inode);
|
||||||
return;
|
return;
|
||||||
|
@ -1218,8 +1223,8 @@ static void __udf_read_inode(struct inode *inode)
|
||||||
}
|
}
|
||||||
brelse(ibh);
|
brelse(ibh);
|
||||||
} else if (fe->icbTag.strategyType != cpu_to_le16(4)) {
|
} else if (fe->icbTag.strategyType != cpu_to_le16(4)) {
|
||||||
printk(KERN_ERR "udf: unsupported strategy type: %d\n",
|
udf_err(inode->i_sb, "unsupported strategy type: %d\n",
|
||||||
le16_to_cpu(fe->icbTag.strategyType));
|
le16_to_cpu(fe->icbTag.strategyType));
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
make_bad_inode(inode);
|
make_bad_inode(inode);
|
||||||
return;
|
return;
|
||||||
|
@ -1413,9 +1418,8 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
|
||||||
udf_debug("METADATA BITMAP FILE-----\n");
|
udf_debug("METADATA BITMAP FILE-----\n");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_ERR "udf: udf_fill_inode(ino %ld) failed unknown "
|
udf_err(inode->i_sb, "(ino %ld) failed unknown file type=%d\n",
|
||||||
"file type=%d\n", inode->i_ino,
|
inode->i_ino, fe->icbTag.fileType);
|
||||||
fe->icbTag.fileType);
|
|
||||||
make_bad_inode(inode);
|
make_bad_inode(inode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1438,8 +1442,8 @@ static int udf_alloc_i_data(struct inode *inode, size_t size)
|
||||||
iinfo->i_ext.i_data = kmalloc(size, GFP_KERNEL);
|
iinfo->i_ext.i_data = kmalloc(size, GFP_KERNEL);
|
||||||
|
|
||||||
if (!iinfo->i_ext.i_data) {
|
if (!iinfo->i_ext.i_data) {
|
||||||
printk(KERN_ERR "udf:udf_alloc_i_data (ino %ld) "
|
udf_err(inode->i_sb, "(ino %ld) no free memory\n",
|
||||||
"no free memory\n", inode->i_ino);
|
inode->i_ino);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1689,9 +1693,8 @@ out:
|
||||||
if (do_sync) {
|
if (do_sync) {
|
||||||
sync_dirty_buffer(bh);
|
sync_dirty_buffer(bh);
|
||||||
if (buffer_write_io_error(bh)) {
|
if (buffer_write_io_error(bh)) {
|
||||||
printk(KERN_WARNING "IO error syncing udf inode "
|
udf_warn(inode->i_sb, "IO error syncing udf inode [%08lx]\n",
|
||||||
"[%s:%08lx]\n", inode->i_sb->s_id,
|
inode->i_ino);
|
||||||
inode->i_ino);
|
|
||||||
err = -EIO;
|
err = -EIO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1982,8 +1985,7 @@ int8_t udf_current_aext(struct inode *inode, struct extent_position *epos,
|
||||||
*elen = le32_to_cpu(lad->extLength) & UDF_EXTENT_LENGTH_MASK;
|
*elen = le32_to_cpu(lad->extLength) & UDF_EXTENT_LENGTH_MASK;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
udf_debug("alloc_type = %d unsupported\n",
|
udf_debug("alloc_type = %d unsupported\n", iinfo->i_alloc_type);
|
||||||
iinfo->i_alloc_type);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ unsigned int udf_get_last_session(struct super_block *sb)
|
||||||
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
udf_debug("XA disk: %s, vol_desc_start=%d\n",
|
udf_debug("XA disk: %s, vol_desc_start=%d\n",
|
||||||
(ms_info.xa_flag ? "yes" : "no"), ms_info.addr.lba);
|
ms_info.xa_flag ? "yes" : "no", ms_info.addr.lba);
|
||||||
if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */
|
if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */
|
||||||
vol_desc_start = ms_info.addr.lba;
|
vol_desc_start = ms_info.addr.lba;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -204,6 +204,7 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
|
||||||
{
|
{
|
||||||
struct tag *tag_p;
|
struct tag *tag_p;
|
||||||
struct buffer_head *bh = NULL;
|
struct buffer_head *bh = NULL;
|
||||||
|
u8 checksum;
|
||||||
|
|
||||||
/* Read the block */
|
/* Read the block */
|
||||||
if (block == 0xFFFFFFFF)
|
if (block == 0xFFFFFFFF)
|
||||||
|
@ -211,8 +212,8 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
|
||||||
|
|
||||||
bh = udf_tread(sb, block);
|
bh = udf_tread(sb, block);
|
||||||
if (!bh) {
|
if (!bh) {
|
||||||
udf_debug("block=%d, location=%d: read failed\n",
|
udf_err(sb, "read failed, block=%u, location=%d\n",
|
||||||
block, location);
|
block, location);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,16 +228,18 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Verify the tag checksum */
|
/* Verify the tag checksum */
|
||||||
if (udf_tag_checksum(tag_p) != tag_p->tagChecksum) {
|
checksum = udf_tag_checksum(tag_p);
|
||||||
printk(KERN_ERR "udf: tag checksum failed block %d\n", block);
|
if (checksum != tag_p->tagChecksum) {
|
||||||
|
udf_err(sb, "tag checksum failed, block %u: 0x%02x != 0x%02x\n",
|
||||||
|
block, checksum, tag_p->tagChecksum);
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Verify the tag version */
|
/* Verify the tag version */
|
||||||
if (tag_p->descVersion != cpu_to_le16(0x0002U) &&
|
if (tag_p->descVersion != cpu_to_le16(0x0002U) &&
|
||||||
tag_p->descVersion != cpu_to_le16(0x0003U)) {
|
tag_p->descVersion != cpu_to_le16(0x0003U)) {
|
||||||
udf_debug("tag version 0x%04x != 0x0002 || 0x0003 block %d\n",
|
udf_err(sb, "tag version 0x%04x != 0x0002 || 0x0003, block %u\n",
|
||||||
le16_to_cpu(tag_p->descVersion), block);
|
le16_to_cpu(tag_p->descVersion), block);
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,8 +251,8 @@ struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block,
|
||||||
return bh;
|
return bh;
|
||||||
|
|
||||||
udf_debug("Crc failure block %d: crc = %d, crclen = %d\n", block,
|
udf_debug("Crc failure block %d: crc = %d, crclen = %d\n", block,
|
||||||
le16_to_cpu(tag_p->descCRC), le16_to_cpu(tag_p->descCRCLength));
|
le16_to_cpu(tag_p->descCRC),
|
||||||
|
le16_to_cpu(tag_p->descCRCLength));
|
||||||
error_out:
|
error_out:
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -799,9 +799,8 @@ static int udf_rmdir(struct inode *dir, struct dentry *dentry)
|
||||||
if (retval)
|
if (retval)
|
||||||
goto end_rmdir;
|
goto end_rmdir;
|
||||||
if (inode->i_nlink != 2)
|
if (inode->i_nlink != 2)
|
||||||
udf_warning(inode->i_sb, "udf_rmdir",
|
udf_warn(inode->i_sb, "empty directory has nlink != 2 (%d)\n",
|
||||||
"empty directory has nlink != 2 (%d)",
|
inode->i_nlink);
|
||||||
inode->i_nlink);
|
|
||||||
clear_nlink(inode);
|
clear_nlink(inode);
|
||||||
inode->i_size = 0;
|
inode->i_size = 0;
|
||||||
inode_dec_link_count(dir);
|
inode_dec_link_count(dir);
|
||||||
|
|
|
@ -33,8 +33,8 @@ uint32_t udf_get_pblock(struct super_block *sb, uint32_t block,
|
||||||
struct udf_sb_info *sbi = UDF_SB(sb);
|
struct udf_sb_info *sbi = UDF_SB(sb);
|
||||||
struct udf_part_map *map;
|
struct udf_part_map *map;
|
||||||
if (partition >= sbi->s_partitions) {
|
if (partition >= sbi->s_partitions) {
|
||||||
udf_debug("block=%d, partition=%d, offset=%d: "
|
udf_debug("block=%d, partition=%d, offset=%d: invalid partition\n",
|
||||||
"invalid partition\n", block, partition, offset);
|
block, partition, offset);
|
||||||
return 0xFFFFFFFF;
|
return 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
map = &sbi->s_partmaps[partition];
|
map = &sbi->s_partmaps[partition];
|
||||||
|
@ -60,8 +60,8 @@ uint32_t udf_get_pblock_virt15(struct super_block *sb, uint32_t block,
|
||||||
vdata = &map->s_type_specific.s_virtual;
|
vdata = &map->s_type_specific.s_virtual;
|
||||||
|
|
||||||
if (block > vdata->s_num_entries) {
|
if (block > vdata->s_num_entries) {
|
||||||
udf_debug("Trying to access block beyond end of VAT "
|
udf_debug("Trying to access block beyond end of VAT (%d max %d)\n",
|
||||||
"(%d max %d)\n", block, vdata->s_num_entries);
|
block, vdata->s_num_entries);
|
||||||
return 0xFFFFFFFF;
|
return 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,9 +321,14 @@ uint32_t udf_get_pblock_meta25(struct super_block *sb, uint32_t block,
|
||||||
/* We shouldn't mount such media... */
|
/* We shouldn't mount such media... */
|
||||||
BUG_ON(!inode);
|
BUG_ON(!inode);
|
||||||
retblk = udf_try_read_meta(inode, block, partition, offset);
|
retblk = udf_try_read_meta(inode, block, partition, offset);
|
||||||
if (retblk == 0xFFFFFFFF) {
|
if (retblk == 0xFFFFFFFF && mdata->s_metadata_fe) {
|
||||||
udf_warning(sb, __func__, "error reading from METADATA, "
|
udf_warn(sb, "error reading from METADATA, trying to read from MIRROR\n");
|
||||||
"trying to read from MIRROR");
|
if (!(mdata->s_flags & MF_MIRROR_FE_LOADED)) {
|
||||||
|
mdata->s_mirror_fe = udf_find_metadata_inode_efe(sb,
|
||||||
|
mdata->s_mirror_file_loc, map->s_partition_num);
|
||||||
|
mdata->s_flags |= MF_MIRROR_FE_LOADED;
|
||||||
|
}
|
||||||
|
|
||||||
inode = mdata->s_mirror_fe;
|
inode = mdata->s_mirror_fe;
|
||||||
if (!inode)
|
if (!inode)
|
||||||
return 0xFFFFFFFF;
|
return 0xFFFFFFFF;
|
||||||
|
|
280
fs/udf/super.c
280
fs/udf/super.c
|
@ -75,8 +75,6 @@
|
||||||
|
|
||||||
#define UDF_DEFAULT_BLOCKSIZE 2048
|
#define UDF_DEFAULT_BLOCKSIZE 2048
|
||||||
|
|
||||||
static char error_buf[1024];
|
|
||||||
|
|
||||||
/* These are the "meat" - everything else is stuffing */
|
/* These are the "meat" - everything else is stuffing */
|
||||||
static int udf_fill_super(struct super_block *, void *, int);
|
static int udf_fill_super(struct super_block *, void *, int);
|
||||||
static void udf_put_super(struct super_block *);
|
static void udf_put_super(struct super_block *);
|
||||||
|
@ -92,8 +90,6 @@ static void udf_close_lvid(struct super_block *);
|
||||||
static unsigned int udf_count_free(struct super_block *);
|
static unsigned int udf_count_free(struct super_block *);
|
||||||
static int udf_statfs(struct dentry *, struct kstatfs *);
|
static int udf_statfs(struct dentry *, struct kstatfs *);
|
||||||
static int udf_show_options(struct seq_file *, struct vfsmount *);
|
static int udf_show_options(struct seq_file *, struct vfsmount *);
|
||||||
static void udf_error(struct super_block *sb, const char *function,
|
|
||||||
const char *fmt, ...);
|
|
||||||
|
|
||||||
struct logicalVolIntegrityDescImpUse *udf_sb_lvidiu(struct udf_sb_info *sbi)
|
struct logicalVolIntegrityDescImpUse *udf_sb_lvidiu(struct udf_sb_info *sbi)
|
||||||
{
|
{
|
||||||
|
@ -244,9 +240,8 @@ static int udf_sb_alloc_partition_maps(struct super_block *sb, u32 count)
|
||||||
sbi->s_partmaps = kcalloc(count, sizeof(struct udf_part_map),
|
sbi->s_partmaps = kcalloc(count, sizeof(struct udf_part_map),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!sbi->s_partmaps) {
|
if (!sbi->s_partmaps) {
|
||||||
udf_error(sb, __func__,
|
udf_err(sb, "Unable to allocate space for %d partition maps\n",
|
||||||
"Unable to allocate space for %d partition maps",
|
count);
|
||||||
count);
|
|
||||||
sbi->s_partitions = 0;
|
sbi->s_partitions = 0;
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
@ -550,8 +545,7 @@ static int udf_parse_options(char *options, struct udf_options *uopt,
|
||||||
uopt->dmode = option & 0777;
|
uopt->dmode = option & 0777;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_ERR "udf: bad mount option \"%s\" "
|
pr_err("bad mount option \"%s\" or missing value\n", p);
|
||||||
"or missing value\n", p);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -645,20 +639,16 @@ static loff_t udf_check_vsd(struct super_block *sb)
|
||||||
udf_debug("ISO9660 Boot Record found\n");
|
udf_debug("ISO9660 Boot Record found\n");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
udf_debug("ISO9660 Primary Volume Descriptor "
|
udf_debug("ISO9660 Primary Volume Descriptor found\n");
|
||||||
"found\n");
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
udf_debug("ISO9660 Supplementary Volume "
|
udf_debug("ISO9660 Supplementary Volume Descriptor found\n");
|
||||||
"Descriptor found\n");
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
udf_debug("ISO9660 Volume Partition Descriptor "
|
udf_debug("ISO9660 Volume Partition Descriptor found\n");
|
||||||
"found\n");
|
|
||||||
break;
|
break;
|
||||||
case 255:
|
case 255:
|
||||||
udf_debug("ISO9660 Volume Descriptor Set "
|
udf_debug("ISO9660 Volume Descriptor Set Terminator found\n");
|
||||||
"Terminator found\n");
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
udf_debug("ISO9660 VRS (%u) found\n",
|
udf_debug("ISO9660 VRS (%u) found\n",
|
||||||
|
@ -809,8 +799,7 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
|
||||||
pvoldesc->recordingDateAndTime)) {
|
pvoldesc->recordingDateAndTime)) {
|
||||||
#ifdef UDFFS_DEBUG
|
#ifdef UDFFS_DEBUG
|
||||||
struct timestamp *ts = &pvoldesc->recordingDateAndTime;
|
struct timestamp *ts = &pvoldesc->recordingDateAndTime;
|
||||||
udf_debug("recording time %04u/%02u/%02u"
|
udf_debug("recording time %04u/%02u/%02u %02u:%02u (%x)\n",
|
||||||
" %02u:%02u (%x)\n",
|
|
||||||
le16_to_cpu(ts->year), ts->month, ts->day, ts->hour,
|
le16_to_cpu(ts->year), ts->month, ts->day, ts->hour,
|
||||||
ts->minute, le16_to_cpu(ts->typeAndTimezone));
|
ts->minute, le16_to_cpu(ts->typeAndTimezone));
|
||||||
#endif
|
#endif
|
||||||
|
@ -821,7 +810,7 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
|
||||||
strncpy(UDF_SB(sb)->s_volume_ident, outstr->u_name,
|
strncpy(UDF_SB(sb)->s_volume_ident, outstr->u_name,
|
||||||
outstr->u_len > 31 ? 31 : outstr->u_len);
|
outstr->u_len > 31 ? 31 : outstr->u_len);
|
||||||
udf_debug("volIdent[] = '%s'\n",
|
udf_debug("volIdent[] = '%s'\n",
|
||||||
UDF_SB(sb)->s_volume_ident);
|
UDF_SB(sb)->s_volume_ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128))
|
if (!udf_build_ustr(instr, pvoldesc->volSetIdent, 128))
|
||||||
|
@ -837,64 +826,57 @@ out1:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct inode *udf_find_metadata_inode_efe(struct super_block *sb,
|
||||||
|
u32 meta_file_loc, u32 partition_num)
|
||||||
|
{
|
||||||
|
struct kernel_lb_addr addr;
|
||||||
|
struct inode *metadata_fe;
|
||||||
|
|
||||||
|
addr.logicalBlockNum = meta_file_loc;
|
||||||
|
addr.partitionReferenceNum = partition_num;
|
||||||
|
|
||||||
|
metadata_fe = udf_iget(sb, &addr);
|
||||||
|
|
||||||
|
if (metadata_fe == NULL)
|
||||||
|
udf_warn(sb, "metadata inode efe not found\n");
|
||||||
|
else if (UDF_I(metadata_fe)->i_alloc_type != ICBTAG_FLAG_AD_SHORT) {
|
||||||
|
udf_warn(sb, "metadata inode efe does not have short allocation descriptors!\n");
|
||||||
|
iput(metadata_fe);
|
||||||
|
metadata_fe = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return metadata_fe;
|
||||||
|
}
|
||||||
|
|
||||||
static int udf_load_metadata_files(struct super_block *sb, int partition)
|
static int udf_load_metadata_files(struct super_block *sb, int partition)
|
||||||
{
|
{
|
||||||
struct udf_sb_info *sbi = UDF_SB(sb);
|
struct udf_sb_info *sbi = UDF_SB(sb);
|
||||||
struct udf_part_map *map;
|
struct udf_part_map *map;
|
||||||
struct udf_meta_data *mdata;
|
struct udf_meta_data *mdata;
|
||||||
struct kernel_lb_addr addr;
|
struct kernel_lb_addr addr;
|
||||||
int fe_error = 0;
|
|
||||||
|
|
||||||
map = &sbi->s_partmaps[partition];
|
map = &sbi->s_partmaps[partition];
|
||||||
mdata = &map->s_type_specific.s_metadata;
|
mdata = &map->s_type_specific.s_metadata;
|
||||||
|
|
||||||
/* metadata address */
|
/* metadata address */
|
||||||
addr.logicalBlockNum = mdata->s_meta_file_loc;
|
|
||||||
addr.partitionReferenceNum = map->s_partition_num;
|
|
||||||
|
|
||||||
udf_debug("Metadata file location: block = %d part = %d\n",
|
udf_debug("Metadata file location: block = %d part = %d\n",
|
||||||
addr.logicalBlockNum, addr.partitionReferenceNum);
|
mdata->s_meta_file_loc, map->s_partition_num);
|
||||||
|
|
||||||
mdata->s_metadata_fe = udf_iget(sb, &addr);
|
mdata->s_metadata_fe = udf_find_metadata_inode_efe(sb,
|
||||||
|
mdata->s_meta_file_loc, map->s_partition_num);
|
||||||
|
|
||||||
if (mdata->s_metadata_fe == NULL) {
|
if (mdata->s_metadata_fe == NULL) {
|
||||||
udf_warning(sb, __func__, "metadata inode efe not found, "
|
/* mirror file entry */
|
||||||
"will try mirror inode.");
|
udf_debug("Mirror metadata file location: block = %d part = %d\n",
|
||||||
fe_error = 1;
|
mdata->s_mirror_file_loc, map->s_partition_num);
|
||||||
} else if (UDF_I(mdata->s_metadata_fe)->i_alloc_type !=
|
|
||||||
ICBTAG_FLAG_AD_SHORT) {
|
|
||||||
udf_warning(sb, __func__, "metadata inode efe does not have "
|
|
||||||
"short allocation descriptors!");
|
|
||||||
fe_error = 1;
|
|
||||||
iput(mdata->s_metadata_fe);
|
|
||||||
mdata->s_metadata_fe = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* mirror file entry */
|
mdata->s_mirror_fe = udf_find_metadata_inode_efe(sb,
|
||||||
addr.logicalBlockNum = mdata->s_mirror_file_loc;
|
mdata->s_mirror_file_loc, map->s_partition_num);
|
||||||
addr.partitionReferenceNum = map->s_partition_num;
|
|
||||||
|
|
||||||
udf_debug("Mirror metadata file location: block = %d part = %d\n",
|
if (mdata->s_mirror_fe == NULL) {
|
||||||
addr.logicalBlockNum, addr.partitionReferenceNum);
|
udf_err(sb, "Both metadata and mirror metadata inode efe can not found\n");
|
||||||
|
|
||||||
mdata->s_mirror_fe = udf_iget(sb, &addr);
|
|
||||||
|
|
||||||
if (mdata->s_mirror_fe == NULL) {
|
|
||||||
if (fe_error) {
|
|
||||||
udf_error(sb, __func__, "mirror inode efe not found "
|
|
||||||
"and metadata inode is missing too, exiting...");
|
|
||||||
goto error_exit;
|
|
||||||
} else
|
|
||||||
udf_warning(sb, __func__, "mirror inode efe not found,"
|
|
||||||
" but metadata inode is OK");
|
|
||||||
} else if (UDF_I(mdata->s_mirror_fe)->i_alloc_type !=
|
|
||||||
ICBTAG_FLAG_AD_SHORT) {
|
|
||||||
udf_warning(sb, __func__, "mirror inode efe does not have "
|
|
||||||
"short allocation descriptors!");
|
|
||||||
iput(mdata->s_mirror_fe);
|
|
||||||
mdata->s_mirror_fe = NULL;
|
|
||||||
if (fe_error)
|
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -907,18 +889,15 @@ static int udf_load_metadata_files(struct super_block *sb, int partition)
|
||||||
addr.partitionReferenceNum = map->s_partition_num;
|
addr.partitionReferenceNum = map->s_partition_num;
|
||||||
|
|
||||||
udf_debug("Bitmap file location: block = %d part = %d\n",
|
udf_debug("Bitmap file location: block = %d part = %d\n",
|
||||||
addr.logicalBlockNum, addr.partitionReferenceNum);
|
addr.logicalBlockNum, addr.partitionReferenceNum);
|
||||||
|
|
||||||
mdata->s_bitmap_fe = udf_iget(sb, &addr);
|
mdata->s_bitmap_fe = udf_iget(sb, &addr);
|
||||||
|
|
||||||
if (mdata->s_bitmap_fe == NULL) {
|
if (mdata->s_bitmap_fe == NULL) {
|
||||||
if (sb->s_flags & MS_RDONLY)
|
if (sb->s_flags & MS_RDONLY)
|
||||||
udf_warning(sb, __func__, "bitmap inode efe "
|
udf_warn(sb, "bitmap inode efe not found but it's ok since the disc is mounted read-only\n");
|
||||||
"not found but it's ok since the disc"
|
|
||||||
" is mounted read-only");
|
|
||||||
else {
|
else {
|
||||||
udf_error(sb, __func__, "bitmap inode efe not "
|
udf_err(sb, "bitmap inode efe not found and attempted read-write mount\n");
|
||||||
"found and attempted read-write mount");
|
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -971,9 +950,8 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
|
||||||
bitmap = vzalloc(size); /* TODO: get rid of vzalloc */
|
bitmap = vzalloc(size); /* TODO: get rid of vzalloc */
|
||||||
|
|
||||||
if (bitmap == NULL) {
|
if (bitmap == NULL) {
|
||||||
udf_error(sb, __func__,
|
udf_err(sb, "Unable to allocate space for bitmap and %d buffer_head pointers\n",
|
||||||
"Unable to allocate space for bitmap "
|
nr_groups);
|
||||||
"and %d buffer_head pointers", nr_groups);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1003,10 +981,9 @@ static int udf_fill_partdesc_info(struct super_block *sb,
|
||||||
if (p->accessType == cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE))
|
if (p->accessType == cpu_to_le32(PD_ACCESS_TYPE_OVERWRITABLE))
|
||||||
map->s_partition_flags |= UDF_PART_FLAG_OVERWRITABLE;
|
map->s_partition_flags |= UDF_PART_FLAG_OVERWRITABLE;
|
||||||
|
|
||||||
udf_debug("Partition (%d type %x) starts at physical %d, "
|
udf_debug("Partition (%d type %x) starts at physical %d, block length %d\n",
|
||||||
"block length %d\n", p_index,
|
p_index, map->s_partition_type,
|
||||||
map->s_partition_type, map->s_partition_root,
|
map->s_partition_root, map->s_partition_len);
|
||||||
map->s_partition_len);
|
|
||||||
|
|
||||||
if (strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR02) &&
|
if (strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR02) &&
|
||||||
strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR03))
|
strcmp(p->partitionContents.ident, PD_PARTITION_CONTENTS_NSR03))
|
||||||
|
@ -1023,12 +1000,12 @@ static int udf_fill_partdesc_info(struct super_block *sb,
|
||||||
map->s_uspace.s_table = udf_iget(sb, &loc);
|
map->s_uspace.s_table = udf_iget(sb, &loc);
|
||||||
if (!map->s_uspace.s_table) {
|
if (!map->s_uspace.s_table) {
|
||||||
udf_debug("cannot load unallocSpaceTable (part %d)\n",
|
udf_debug("cannot load unallocSpaceTable (part %d)\n",
|
||||||
p_index);
|
p_index);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_TABLE;
|
map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_TABLE;
|
||||||
udf_debug("unallocSpaceTable (part %d) @ %ld\n",
|
udf_debug("unallocSpaceTable (part %d) @ %ld\n",
|
||||||
p_index, map->s_uspace.s_table->i_ino);
|
p_index, map->s_uspace.s_table->i_ino);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phd->unallocSpaceBitmap.extLength) {
|
if (phd->unallocSpaceBitmap.extLength) {
|
||||||
|
@ -1041,8 +1018,8 @@ static int udf_fill_partdesc_info(struct super_block *sb,
|
||||||
bitmap->s_extPosition = le32_to_cpu(
|
bitmap->s_extPosition = le32_to_cpu(
|
||||||
phd->unallocSpaceBitmap.extPosition);
|
phd->unallocSpaceBitmap.extPosition);
|
||||||
map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_BITMAP;
|
map->s_partition_flags |= UDF_PART_FLAG_UNALLOC_BITMAP;
|
||||||
udf_debug("unallocSpaceBitmap (part %d) @ %d\n", p_index,
|
udf_debug("unallocSpaceBitmap (part %d) @ %d\n",
|
||||||
bitmap->s_extPosition);
|
p_index, bitmap->s_extPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phd->partitionIntegrityTable.extLength)
|
if (phd->partitionIntegrityTable.extLength)
|
||||||
|
@ -1058,13 +1035,13 @@ static int udf_fill_partdesc_info(struct super_block *sb,
|
||||||
map->s_fspace.s_table = udf_iget(sb, &loc);
|
map->s_fspace.s_table = udf_iget(sb, &loc);
|
||||||
if (!map->s_fspace.s_table) {
|
if (!map->s_fspace.s_table) {
|
||||||
udf_debug("cannot load freedSpaceTable (part %d)\n",
|
udf_debug("cannot load freedSpaceTable (part %d)\n",
|
||||||
p_index);
|
p_index);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
map->s_partition_flags |= UDF_PART_FLAG_FREED_TABLE;
|
map->s_partition_flags |= UDF_PART_FLAG_FREED_TABLE;
|
||||||
udf_debug("freedSpaceTable (part %d) @ %ld\n",
|
udf_debug("freedSpaceTable (part %d) @ %ld\n",
|
||||||
p_index, map->s_fspace.s_table->i_ino);
|
p_index, map->s_fspace.s_table->i_ino);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phd->freedSpaceBitmap.extLength) {
|
if (phd->freedSpaceBitmap.extLength) {
|
||||||
|
@ -1077,8 +1054,8 @@ static int udf_fill_partdesc_info(struct super_block *sb,
|
||||||
bitmap->s_extPosition = le32_to_cpu(
|
bitmap->s_extPosition = le32_to_cpu(
|
||||||
phd->freedSpaceBitmap.extPosition);
|
phd->freedSpaceBitmap.extPosition);
|
||||||
map->s_partition_flags |= UDF_PART_FLAG_FREED_BITMAP;
|
map->s_partition_flags |= UDF_PART_FLAG_FREED_BITMAP;
|
||||||
udf_debug("freedSpaceBitmap (part %d) @ %d\n", p_index,
|
udf_debug("freedSpaceBitmap (part %d) @ %d\n",
|
||||||
bitmap->s_extPosition);
|
p_index, bitmap->s_extPosition);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1118,11 +1095,9 @@ static int udf_load_vat(struct super_block *sb, int p_index, int type1_index)
|
||||||
udf_find_vat_block(sb, p_index, type1_index, sbi->s_last_block);
|
udf_find_vat_block(sb, p_index, type1_index, sbi->s_last_block);
|
||||||
if (!sbi->s_vat_inode &&
|
if (!sbi->s_vat_inode &&
|
||||||
sbi->s_last_block != blocks - 1) {
|
sbi->s_last_block != blocks - 1) {
|
||||||
printk(KERN_NOTICE "UDF-fs: Failed to read VAT inode from the"
|
pr_notice("Failed to read VAT inode from the last recorded block (%lu), retrying with the last block of the device (%lu).\n",
|
||||||
" last recorded block (%lu), retrying with the last "
|
(unsigned long)sbi->s_last_block,
|
||||||
"block of the device (%lu).\n",
|
(unsigned long)blocks - 1);
|
||||||
(unsigned long)sbi->s_last_block,
|
|
||||||
(unsigned long)blocks - 1);
|
|
||||||
udf_find_vat_block(sb, p_index, type1_index, blocks - 1);
|
udf_find_vat_block(sb, p_index, type1_index, blocks - 1);
|
||||||
}
|
}
|
||||||
if (!sbi->s_vat_inode)
|
if (!sbi->s_vat_inode)
|
||||||
|
@ -1220,8 +1195,8 @@ static int udf_load_partdesc(struct super_block *sb, sector_t block)
|
||||||
if (map->s_partition_type == UDF_METADATA_MAP25) {
|
if (map->s_partition_type == UDF_METADATA_MAP25) {
|
||||||
ret = udf_load_metadata_files(sb, i);
|
ret = udf_load_metadata_files(sb, i);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_ERR "UDF-fs: error loading MetaData "
|
udf_err(sb, "error loading MetaData partition map %d\n",
|
||||||
"partition map %d\n", i);
|
i);
|
||||||
goto out_bh;
|
goto out_bh;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1234,9 +1209,7 @@ static int udf_load_partdesc(struct super_block *sb, sector_t block)
|
||||||
* overwrite blocks instead of relocating them).
|
* overwrite blocks instead of relocating them).
|
||||||
*/
|
*/
|
||||||
sb->s_flags |= MS_RDONLY;
|
sb->s_flags |= MS_RDONLY;
|
||||||
printk(KERN_NOTICE "UDF-fs: Filesystem marked read-only "
|
pr_notice("Filesystem marked read-only because writing to pseudooverwrite partition is not implemented\n");
|
||||||
"because writing to pseudooverwrite partition is "
|
|
||||||
"not implemented.\n");
|
|
||||||
}
|
}
|
||||||
out_bh:
|
out_bh:
|
||||||
/* In case loading failed, we handle cleanup in udf_fill_super */
|
/* In case loading failed, we handle cleanup in udf_fill_super */
|
||||||
|
@ -1344,9 +1317,8 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
|
||||||
struct metadataPartitionMap *mdm =
|
struct metadataPartitionMap *mdm =
|
||||||
(struct metadataPartitionMap *)
|
(struct metadataPartitionMap *)
|
||||||
&(lvd->partitionMaps[offset]);
|
&(lvd->partitionMaps[offset]);
|
||||||
udf_debug("Parsing Logical vol part %d "
|
udf_debug("Parsing Logical vol part %d type %d id=%s\n",
|
||||||
"type %d id=%s\n", i, type,
|
i, type, UDF_ID_METADATA);
|
||||||
UDF_ID_METADATA);
|
|
||||||
|
|
||||||
map->s_partition_type = UDF_METADATA_MAP25;
|
map->s_partition_type = UDF_METADATA_MAP25;
|
||||||
map->s_partition_func = udf_get_pblock_meta25;
|
map->s_partition_func = udf_get_pblock_meta25;
|
||||||
|
@ -1361,25 +1333,24 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
|
||||||
le32_to_cpu(mdm->allocUnitSize);
|
le32_to_cpu(mdm->allocUnitSize);
|
||||||
mdata->s_align_unit_size =
|
mdata->s_align_unit_size =
|
||||||
le16_to_cpu(mdm->alignUnitSize);
|
le16_to_cpu(mdm->alignUnitSize);
|
||||||
mdata->s_dup_md_flag =
|
if (mdm->flags & 0x01)
|
||||||
mdm->flags & 0x01;
|
mdata->s_flags |= MF_DUPLICATE_MD;
|
||||||
|
|
||||||
udf_debug("Metadata Ident suffix=0x%x\n",
|
udf_debug("Metadata Ident suffix=0x%x\n",
|
||||||
(le16_to_cpu(
|
le16_to_cpu(*(__le16 *)
|
||||||
((__le16 *)
|
mdm->partIdent.identSuffix));
|
||||||
mdm->partIdent.identSuffix)[0])));
|
|
||||||
udf_debug("Metadata part num=%d\n",
|
udf_debug("Metadata part num=%d\n",
|
||||||
le16_to_cpu(mdm->partitionNum));
|
le16_to_cpu(mdm->partitionNum));
|
||||||
udf_debug("Metadata part alloc unit size=%d\n",
|
udf_debug("Metadata part alloc unit size=%d\n",
|
||||||
le32_to_cpu(mdm->allocUnitSize));
|
le32_to_cpu(mdm->allocUnitSize));
|
||||||
udf_debug("Metadata file loc=%d\n",
|
udf_debug("Metadata file loc=%d\n",
|
||||||
le32_to_cpu(mdm->metadataFileLoc));
|
le32_to_cpu(mdm->metadataFileLoc));
|
||||||
udf_debug("Mirror file loc=%d\n",
|
udf_debug("Mirror file loc=%d\n",
|
||||||
le32_to_cpu(mdm->metadataMirrorFileLoc));
|
le32_to_cpu(mdm->metadataMirrorFileLoc));
|
||||||
udf_debug("Bitmap file loc=%d\n",
|
udf_debug("Bitmap file loc=%d\n",
|
||||||
le32_to_cpu(mdm->metadataBitmapFileLoc));
|
le32_to_cpu(mdm->metadataBitmapFileLoc));
|
||||||
udf_debug("Duplicate Flag: %d %d\n",
|
udf_debug("Flags: %d %d\n",
|
||||||
mdata->s_dup_md_flag, mdm->flags);
|
mdata->s_flags, mdm->flags);
|
||||||
} else {
|
} else {
|
||||||
udf_debug("Unknown ident: %s\n",
|
udf_debug("Unknown ident: %s\n",
|
||||||
upm2->partIdent.ident);
|
upm2->partIdent.ident);
|
||||||
|
@ -1389,16 +1360,15 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
|
||||||
map->s_partition_num = le16_to_cpu(upm2->partitionNum);
|
map->s_partition_num = le16_to_cpu(upm2->partitionNum);
|
||||||
}
|
}
|
||||||
udf_debug("Partition (%d:%d) type %d on volume %d\n",
|
udf_debug("Partition (%d:%d) type %d on volume %d\n",
|
||||||
i, map->s_partition_num, type,
|
i, map->s_partition_num, type, map->s_volumeseqnum);
|
||||||
map->s_volumeseqnum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileset) {
|
if (fileset) {
|
||||||
struct long_ad *la = (struct long_ad *)&(lvd->logicalVolContentsUse[0]);
|
struct long_ad *la = (struct long_ad *)&(lvd->logicalVolContentsUse[0]);
|
||||||
|
|
||||||
*fileset = lelb_to_cpu(la->extLocation);
|
*fileset = lelb_to_cpu(la->extLocation);
|
||||||
udf_debug("FileSet found in LogicalVolDesc at block=%d, "
|
udf_debug("FileSet found in LogicalVolDesc at block=%d, partition=%d\n",
|
||||||
"partition=%d\n", fileset->logicalBlockNum,
|
fileset->logicalBlockNum,
|
||||||
fileset->partitionReferenceNum);
|
fileset->partitionReferenceNum);
|
||||||
}
|
}
|
||||||
if (lvd->integritySeqExt.extLength)
|
if (lvd->integritySeqExt.extLength)
|
||||||
|
@ -1478,9 +1448,9 @@ static noinline int udf_process_sequence(struct super_block *sb, long block,
|
||||||
|
|
||||||
bh = udf_read_tagged(sb, block, block, &ident);
|
bh = udf_read_tagged(sb, block, block, &ident);
|
||||||
if (!bh) {
|
if (!bh) {
|
||||||
printk(KERN_ERR "udf: Block %Lu of volume descriptor "
|
udf_err(sb,
|
||||||
"sequence is corrupted or we could not read "
|
"Block %llu of volume descriptor sequence is corrupted or we could not read it\n",
|
||||||
"it.\n", (unsigned long long)block);
|
(unsigned long long)block);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1553,7 +1523,7 @@ static noinline int udf_process_sequence(struct super_block *sb, long block,
|
||||||
* in a suitable order
|
* in a suitable order
|
||||||
*/
|
*/
|
||||||
if (!vds[VDS_POS_PRIMARY_VOL_DESC].block) {
|
if (!vds[VDS_POS_PRIMARY_VOL_DESC].block) {
|
||||||
printk(KERN_ERR "udf: Primary Volume Descriptor not found!\n");
|
udf_err(sb, "Primary Volume Descriptor not found!\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (udf_load_pvoldesc(sb, vds[VDS_POS_PRIMARY_VOL_DESC].block))
|
if (udf_load_pvoldesc(sb, vds[VDS_POS_PRIMARY_VOL_DESC].block))
|
||||||
|
@ -1740,7 +1710,7 @@ static int udf_load_vrs(struct super_block *sb, struct udf_options *uopt,
|
||||||
|
|
||||||
if (!sb_set_blocksize(sb, uopt->blocksize)) {
|
if (!sb_set_blocksize(sb, uopt->blocksize)) {
|
||||||
if (!silent)
|
if (!silent)
|
||||||
printk(KERN_WARNING "UDF-fs: Bad block size\n");
|
udf_warn(sb, "Bad block size\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
sbi->s_last_block = uopt->lastblock;
|
sbi->s_last_block = uopt->lastblock;
|
||||||
|
@ -1749,12 +1719,11 @@ static int udf_load_vrs(struct super_block *sb, struct udf_options *uopt,
|
||||||
nsr_off = udf_check_vsd(sb);
|
nsr_off = udf_check_vsd(sb);
|
||||||
if (!nsr_off) {
|
if (!nsr_off) {
|
||||||
if (!silent)
|
if (!silent)
|
||||||
printk(KERN_WARNING "UDF-fs: No VRS found\n");
|
udf_warn(sb, "No VRS found\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (nsr_off == -1)
|
if (nsr_off == -1)
|
||||||
udf_debug("Failed to read byte 32768. Assuming open "
|
udf_debug("Failed to read byte 32768. Assuming open disc. Skipping validity check\n");
|
||||||
"disc. Skipping validity check\n");
|
|
||||||
if (!sbi->s_last_block)
|
if (!sbi->s_last_block)
|
||||||
sbi->s_last_block = udf_get_last_block(sb);
|
sbi->s_last_block = udf_get_last_block(sb);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1765,7 +1734,7 @@ static int udf_load_vrs(struct super_block *sb, struct udf_options *uopt,
|
||||||
sbi->s_anchor = uopt->anchor;
|
sbi->s_anchor = uopt->anchor;
|
||||||
if (!udf_find_anchor(sb, fileset)) {
|
if (!udf_find_anchor(sb, fileset)) {
|
||||||
if (!silent)
|
if (!silent)
|
||||||
printk(KERN_WARNING "UDF-fs: No anchor found\n");
|
udf_warn(sb, "No anchor found\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1937,8 +1906,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
|
||||||
|
|
||||||
if (uopt.flags & (1 << UDF_FLAG_UTF8) &&
|
if (uopt.flags & (1 << UDF_FLAG_UTF8) &&
|
||||||
uopt.flags & (1 << UDF_FLAG_NLS_MAP)) {
|
uopt.flags & (1 << UDF_FLAG_NLS_MAP)) {
|
||||||
udf_error(sb, "udf_read_super",
|
udf_err(sb, "utf8 cannot be combined with iocharset\n");
|
||||||
"utf8 cannot be combined with iocharset\n");
|
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_UDF_NLS
|
#ifdef CONFIG_UDF_NLS
|
||||||
|
@ -1987,15 +1955,14 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
|
||||||
ret = udf_load_vrs(sb, &uopt, silent, &fileset);
|
ret = udf_load_vrs(sb, &uopt, silent, &fileset);
|
||||||
if (!ret && uopt.blocksize != UDF_DEFAULT_BLOCKSIZE) {
|
if (!ret && uopt.blocksize != UDF_DEFAULT_BLOCKSIZE) {
|
||||||
if (!silent)
|
if (!silent)
|
||||||
printk(KERN_NOTICE
|
pr_notice("Rescanning with blocksize %d\n",
|
||||||
"UDF-fs: Rescanning with blocksize "
|
UDF_DEFAULT_BLOCKSIZE);
|
||||||
"%d\n", UDF_DEFAULT_BLOCKSIZE);
|
|
||||||
uopt.blocksize = UDF_DEFAULT_BLOCKSIZE;
|
uopt.blocksize = UDF_DEFAULT_BLOCKSIZE;
|
||||||
ret = udf_load_vrs(sb, &uopt, silent, &fileset);
|
ret = udf_load_vrs(sb, &uopt, silent, &fileset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
printk(KERN_WARNING "UDF-fs: No partition found (1)\n");
|
udf_warn(sb, "No partition found (1)\n");
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2010,10 +1977,9 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
|
||||||
le16_to_cpu(lvidiu->maxUDFWriteRev); */
|
le16_to_cpu(lvidiu->maxUDFWriteRev); */
|
||||||
|
|
||||||
if (minUDFReadRev > UDF_MAX_READ_VERSION) {
|
if (minUDFReadRev > UDF_MAX_READ_VERSION) {
|
||||||
printk(KERN_ERR "UDF-fs: minUDFReadRev=%x "
|
udf_err(sb, "minUDFReadRev=%x (max is %x)\n",
|
||||||
"(max is %x)\n",
|
le16_to_cpu(lvidiu->minUDFReadRev),
|
||||||
le16_to_cpu(lvidiu->minUDFReadRev),
|
UDF_MAX_READ_VERSION);
|
||||||
UDF_MAX_READ_VERSION);
|
|
||||||
goto error_out;
|
goto error_out;
|
||||||
} else if (minUDFWriteRev > UDF_MAX_WRITE_VERSION)
|
} else if (minUDFWriteRev > UDF_MAX_WRITE_VERSION)
|
||||||
sb->s_flags |= MS_RDONLY;
|
sb->s_flags |= MS_RDONLY;
|
||||||
|
@ -2027,28 +1993,27 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sbi->s_partitions) {
|
if (!sbi->s_partitions) {
|
||||||
printk(KERN_WARNING "UDF-fs: No partition found (2)\n");
|
udf_warn(sb, "No partition found (2)\n");
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sbi->s_partmaps[sbi->s_partition].s_partition_flags &
|
if (sbi->s_partmaps[sbi->s_partition].s_partition_flags &
|
||||||
UDF_PART_FLAG_READ_ONLY) {
|
UDF_PART_FLAG_READ_ONLY) {
|
||||||
printk(KERN_NOTICE "UDF-fs: Partition marked readonly; "
|
pr_notice("Partition marked readonly; forcing readonly mount\n");
|
||||||
"forcing readonly mount\n");
|
|
||||||
sb->s_flags |= MS_RDONLY;
|
sb->s_flags |= MS_RDONLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (udf_find_fileset(sb, &fileset, &rootdir)) {
|
if (udf_find_fileset(sb, &fileset, &rootdir)) {
|
||||||
printk(KERN_WARNING "UDF-fs: No fileset found\n");
|
udf_warn(sb, "No fileset found\n");
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
struct timestamp ts;
|
struct timestamp ts;
|
||||||
udf_time_to_disk_stamp(&ts, sbi->s_record_time);
|
udf_time_to_disk_stamp(&ts, sbi->s_record_time);
|
||||||
udf_info("UDF: Mounting volume '%s', "
|
udf_info("Mounting volume '%s', timestamp %04u/%02u/%02u %02u:%02u (%x)\n",
|
||||||
"timestamp %04u/%02u/%02u %02u:%02u (%x)\n",
|
sbi->s_volume_ident,
|
||||||
sbi->s_volume_ident, le16_to_cpu(ts.year), ts.month, ts.day,
|
le16_to_cpu(ts.year), ts.month, ts.day,
|
||||||
ts.hour, ts.minute, le16_to_cpu(ts.typeAndTimezone));
|
ts.hour, ts.minute, le16_to_cpu(ts.typeAndTimezone));
|
||||||
}
|
}
|
||||||
if (!(sb->s_flags & MS_RDONLY))
|
if (!(sb->s_flags & MS_RDONLY))
|
||||||
|
@ -2059,8 +2024,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
|
||||||
/* perhaps it's not extensible enough, but for now ... */
|
/* perhaps it's not extensible enough, but for now ... */
|
||||||
inode = udf_iget(sb, &rootdir);
|
inode = udf_iget(sb, &rootdir);
|
||||||
if (!inode) {
|
if (!inode) {
|
||||||
printk(KERN_ERR "UDF-fs: Error in udf_iget, block=%d, "
|
udf_err(sb, "Error in udf_iget, block=%d, partition=%d\n",
|
||||||
"partition=%d\n",
|
|
||||||
rootdir.logicalBlockNum, rootdir.partitionReferenceNum);
|
rootdir.logicalBlockNum, rootdir.partitionReferenceNum);
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
@ -2068,7 +2032,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
|
||||||
/* Allocate a dentry for the root inode */
|
/* Allocate a dentry for the root inode */
|
||||||
sb->s_root = d_alloc_root(inode);
|
sb->s_root = d_alloc_root(inode);
|
||||||
if (!sb->s_root) {
|
if (!sb->s_root) {
|
||||||
printk(KERN_ERR "UDF-fs: Couldn't allocate root dentry\n");
|
udf_err(sb, "Couldn't allocate root dentry\n");
|
||||||
iput(inode);
|
iput(inode);
|
||||||
goto error_out;
|
goto error_out;
|
||||||
}
|
}
|
||||||
|
@ -2096,32 +2060,40 @@ error_out:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void udf_error(struct super_block *sb, const char *function,
|
void _udf_err(struct super_block *sb, const char *function,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
struct va_format vaf;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
if (!(sb->s_flags & MS_RDONLY)) {
|
/* mark sb error */
|
||||||
/* mark sb error */
|
if (!(sb->s_flags & MS_RDONLY))
|
||||||
sb->s_dirt = 1;
|
sb->s_dirt = 1;
|
||||||
}
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vsnprintf(error_buf, sizeof(error_buf), fmt, args);
|
|
||||||
|
vaf.fmt = fmt;
|
||||||
|
vaf.va = &args;
|
||||||
|
|
||||||
|
pr_err("error (device %s): %s: %pV", sb->s_id, function, &vaf);
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
printk(KERN_CRIT "UDF-fs error (device %s): %s: %s\n",
|
|
||||||
sb->s_id, function, error_buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void udf_warning(struct super_block *sb, const char *function,
|
void _udf_warn(struct super_block *sb, const char *function,
|
||||||
const char *fmt, ...)
|
const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
struct va_format vaf;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vsnprintf(error_buf, sizeof(error_buf), fmt, args);
|
|
||||||
|
vaf.fmt = fmt;
|
||||||
|
vaf.va = &args;
|
||||||
|
|
||||||
|
pr_warn("warning (device %s): %s: %pV", sb->s_id, function, &vaf);
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
printk(KERN_WARNING "UDF-fs warning (device %s): %s: %s\n",
|
|
||||||
sb->s_id, function, error_buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void udf_put_super(struct super_block *sb)
|
static void udf_put_super(struct super_block *sb)
|
||||||
|
@ -2213,11 +2185,11 @@ static unsigned int udf_count_free_bitmap(struct super_block *sb,
|
||||||
bh = udf_read_ptagged(sb, &loc, 0, &ident);
|
bh = udf_read_ptagged(sb, &loc, 0, &ident);
|
||||||
|
|
||||||
if (!bh) {
|
if (!bh) {
|
||||||
printk(KERN_ERR "udf: udf_count_free failed\n");
|
udf_err(sb, "udf_count_free failed\n");
|
||||||
goto out;
|
goto out;
|
||||||
} else if (ident != TAG_IDENT_SBD) {
|
} else if (ident != TAG_IDENT_SBD) {
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
printk(KERN_ERR "udf: udf_count_free failed\n");
|
udf_err(sb, "udf_count_free failed\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,23 +95,21 @@ void udf_truncate_tail_extent(struct inode *inode)
|
||||||
lbcount += elen;
|
lbcount += elen;
|
||||||
if (lbcount > inode->i_size) {
|
if (lbcount > inode->i_size) {
|
||||||
if (lbcount - inode->i_size >= inode->i_sb->s_blocksize)
|
if (lbcount - inode->i_size >= inode->i_sb->s_blocksize)
|
||||||
printk(KERN_WARNING
|
udf_warn(inode->i_sb,
|
||||||
"udf_truncate_tail_extent(): Too long "
|
"Too long extent after EOF in inode %u: i_size: %lld lbcount: %lld extent %u+%u\n",
|
||||||
"extent after EOF in inode %u: i_size: "
|
(unsigned)inode->i_ino,
|
||||||
"%Ld lbcount: %Ld extent %u+%u\n",
|
(long long)inode->i_size,
|
||||||
(unsigned)inode->i_ino,
|
(long long)lbcount,
|
||||||
(long long)inode->i_size,
|
(unsigned)eloc.logicalBlockNum,
|
||||||
(long long)lbcount,
|
(unsigned)elen);
|
||||||
(unsigned)eloc.logicalBlockNum,
|
|
||||||
(unsigned)elen);
|
|
||||||
nelen = elen - (lbcount - inode->i_size);
|
nelen = elen - (lbcount - inode->i_size);
|
||||||
epos.offset -= adsize;
|
epos.offset -= adsize;
|
||||||
extent_trunc(inode, &epos, &eloc, etype, elen, nelen);
|
extent_trunc(inode, &epos, &eloc, etype, elen, nelen);
|
||||||
epos.offset += adsize;
|
epos.offset += adsize;
|
||||||
if (udf_next_aext(inode, &epos, &eloc, &elen, 1) != -1)
|
if (udf_next_aext(inode, &epos, &eloc, &elen, 1) != -1)
|
||||||
printk(KERN_ERR "udf_truncate_tail_extent(): "
|
udf_err(inode->i_sb,
|
||||||
"Extent after EOF in inode %u.\n",
|
"Extent after EOF in inode %u\n",
|
||||||
(unsigned)inode->i_ino);
|
(unsigned)inode->i_ino);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,13 +54,16 @@
|
||||||
|
|
||||||
#pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */
|
#pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */
|
||||||
|
|
||||||
|
#define MF_DUPLICATE_MD 0x01
|
||||||
|
#define MF_MIRROR_FE_LOADED 0x02
|
||||||
|
|
||||||
struct udf_meta_data {
|
struct udf_meta_data {
|
||||||
__u32 s_meta_file_loc;
|
__u32 s_meta_file_loc;
|
||||||
__u32 s_mirror_file_loc;
|
__u32 s_mirror_file_loc;
|
||||||
__u32 s_bitmap_file_loc;
|
__u32 s_bitmap_file_loc;
|
||||||
__u32 s_alloc_unit_size;
|
__u32 s_alloc_unit_size;
|
||||||
__u16 s_align_unit_size;
|
__u16 s_align_unit_size;
|
||||||
__u8 s_dup_md_flag;
|
int s_flags;
|
||||||
struct inode *s_metadata_fe;
|
struct inode *s_metadata_fe;
|
||||||
struct inode *s_mirror_fe;
|
struct inode *s_mirror_fe;
|
||||||
struct inode *s_bitmap_fe;
|
struct inode *s_bitmap_fe;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef __UDF_DECL_H
|
#ifndef __UDF_DECL_H
|
||||||
#define __UDF_DECL_H
|
#define __UDF_DECL_H
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) "UDF-fs: " fmt
|
||||||
|
|
||||||
#include "ecma_167.h"
|
#include "ecma_167.h"
|
||||||
#include "osta_udf.h"
|
#include "osta_udf.h"
|
||||||
|
|
||||||
|
@ -16,23 +18,30 @@
|
||||||
#define UDF_PREALLOCATE
|
#define UDF_PREALLOCATE
|
||||||
#define UDF_DEFAULT_PREALLOC_BLOCKS 8
|
#define UDF_DEFAULT_PREALLOC_BLOCKS 8
|
||||||
|
|
||||||
|
extern __printf(3, 4) void _udf_err(struct super_block *sb,
|
||||||
|
const char *function, const char *fmt, ...);
|
||||||
|
#define udf_err(sb, fmt, ...) \
|
||||||
|
_udf_err(sb, __func__, fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
|
extern __printf(3, 4) void _udf_warn(struct super_block *sb,
|
||||||
|
const char *function, const char *fmt, ...);
|
||||||
|
#define udf_warn(sb, fmt, ...) \
|
||||||
|
_udf_warn(sb, __func__, fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
|
#define udf_info(fmt, ...) \
|
||||||
|
pr_info("INFO " fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
#undef UDFFS_DEBUG
|
#undef UDFFS_DEBUG
|
||||||
|
|
||||||
#ifdef UDFFS_DEBUG
|
#ifdef UDFFS_DEBUG
|
||||||
#define udf_debug(f, a...) \
|
#define udf_debug(fmt, ...) \
|
||||||
do { \
|
printk(KERN_DEBUG pr_fmt("%s:%d:%s: " fmt), \
|
||||||
printk(KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \
|
__FILE__, __LINE__, __func__, ##__VA_ARGS__)
|
||||||
__FILE__, __LINE__, __func__); \
|
|
||||||
printk(f, ##a); \
|
|
||||||
} while (0)
|
|
||||||
#else
|
#else
|
||||||
#define udf_debug(f, a...) /**/
|
#define udf_debug(fmt, ...) \
|
||||||
|
no_printk(fmt, ##__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define udf_info(f, a...) \
|
|
||||||
printk(KERN_INFO "UDF-fs INFO " f, ##a);
|
|
||||||
|
|
||||||
|
|
||||||
#define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) )
|
#define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) )
|
||||||
#define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) )
|
#define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) )
|
||||||
|
|
||||||
|
@ -112,8 +121,6 @@ struct extent_position {
|
||||||
|
|
||||||
/* super.c */
|
/* super.c */
|
||||||
|
|
||||||
extern __printf(3, 4) void udf_warning(struct super_block *, const char *,
|
|
||||||
const char *, ...);
|
|
||||||
static inline void udf_updated_lvid(struct super_block *sb)
|
static inline void udf_updated_lvid(struct super_block *sb)
|
||||||
{
|
{
|
||||||
struct buffer_head *bh = UDF_SB(sb)->s_lvid_bh;
|
struct buffer_head *bh = UDF_SB(sb)->s_lvid_bh;
|
||||||
|
@ -126,6 +133,8 @@ static inline void udf_updated_lvid(struct super_block *sb)
|
||||||
UDF_SB(sb)->s_lvid_dirty = 1;
|
UDF_SB(sb)->s_lvid_dirty = 1;
|
||||||
}
|
}
|
||||||
extern u64 lvid_get_unique_id(struct super_block *sb);
|
extern u64 lvid_get_unique_id(struct super_block *sb);
|
||||||
|
struct inode *udf_find_metadata_inode_efe(struct super_block *sb,
|
||||||
|
u32 meta_file_loc, u32 partition_num);
|
||||||
|
|
||||||
/* namei.c */
|
/* namei.c */
|
||||||
extern int udf_write_fi(struct inode *inode, struct fileIdentDesc *,
|
extern int udf_write_fi(struct inode *inode, struct fileIdentDesc *,
|
||||||
|
|
|
@ -34,9 +34,10 @@
|
||||||
* http://www.boulder.nist.gov/timefreq/pubs/bulletin/leapsecond.htm
|
* http://www.boulder.nist.gov/timefreq/pubs/bulletin/leapsecond.htm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "udfdecl.h"
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include "udfdecl.h"
|
|
||||||
|
|
||||||
#define EPOCH_YEAR 1970
|
#define EPOCH_YEAR 1970
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@ int udf_CS0toUTF8(struct ustr *utf_o, const struct ustr *ocu_i)
|
||||||
cmp_id = ocu_i->u_cmpID;
|
cmp_id = ocu_i->u_cmpID;
|
||||||
if (cmp_id != 8 && cmp_id != 16) {
|
if (cmp_id != 8 && cmp_id != 16) {
|
||||||
memset(utf_o, 0, sizeof(struct ustr));
|
memset(utf_o, 0, sizeof(struct ustr));
|
||||||
printk(KERN_ERR "udf: unknown compression code (%d) stri=%s\n",
|
pr_err("unknown compression code (%d) stri=%s\n",
|
||||||
cmp_id, ocu_i->u_name);
|
cmp_id, ocu_i->u_name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ try_again:
|
||||||
if (utf_cnt) {
|
if (utf_cnt) {
|
||||||
error_out:
|
error_out:
|
||||||
ocu[++u_len] = '?';
|
ocu[++u_len] = '?';
|
||||||
printk(KERN_DEBUG "udf: bad UTF-8 character\n");
|
printk(KERN_DEBUG pr_fmt("bad UTF-8 character\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
ocu[length - 1] = (uint8_t)u_len + 1;
|
ocu[length - 1] = (uint8_t)u_len + 1;
|
||||||
|
@ -267,7 +267,7 @@ static int udf_CS0toNLS(struct nls_table *nls, struct ustr *utf_o,
|
||||||
cmp_id = ocu_i->u_cmpID;
|
cmp_id = ocu_i->u_cmpID;
|
||||||
if (cmp_id != 8 && cmp_id != 16) {
|
if (cmp_id != 8 && cmp_id != 16) {
|
||||||
memset(utf_o, 0, sizeof(struct ustr));
|
memset(utf_o, 0, sizeof(struct ustr));
|
||||||
printk(KERN_ERR "udf: unknown compression code (%d) stri=%s\n",
|
pr_err("unknown compression code (%d) stri=%s\n",
|
||||||
cmp_id, ocu_i->u_name);
|
cmp_id, ocu_i->u_name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,7 +381,7 @@ struct ext3_inode {
|
||||||
* Mount flags
|
* Mount flags
|
||||||
*/
|
*/
|
||||||
#define EXT3_MOUNT_CHECK 0x00001 /* Do mount-time checks */
|
#define EXT3_MOUNT_CHECK 0x00001 /* Do mount-time checks */
|
||||||
#define EXT3_MOUNT_OLDALLOC 0x00002 /* Don't use the new Orlov allocator */
|
/* EXT3_MOUNT_OLDALLOC was there */
|
||||||
#define EXT3_MOUNT_GRPID 0x00004 /* Create files with directory's group */
|
#define EXT3_MOUNT_GRPID 0x00004 /* Create files with directory's group */
|
||||||
#define EXT3_MOUNT_DEBUG 0x00008 /* Some debugging messages */
|
#define EXT3_MOUNT_DEBUG 0x00008 /* Some debugging messages */
|
||||||
#define EXT3_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */
|
#define EXT3_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */
|
||||||
|
|
|
@ -76,10 +76,6 @@ struct ext3_sb_info {
|
||||||
struct mutex s_resize_lock;
|
struct mutex s_resize_lock;
|
||||||
unsigned long s_commit_interval;
|
unsigned long s_commit_interval;
|
||||||
struct block_device *journal_bdev;
|
struct block_device *journal_bdev;
|
||||||
#ifdef CONFIG_JBD_DEBUG
|
|
||||||
struct timer_list turn_ro_timer; /* For turning read-only (crash simulation) */
|
|
||||||
wait_queue_head_t ro_wait_queue; /* For people waiting for the fs to go read-only */
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_QUOTA
|
#ifdef CONFIG_QUOTA
|
||||||
char *s_qf_names[MAXQUOTAS]; /* Names of quota files with journalled quota */
|
char *s_qf_names[MAXQUOTAS]; /* Names of quota files with journalled quota */
|
||||||
int s_jquota_fmt; /* Format of quota to use */
|
int s_jquota_fmt; /* Format of quota to use */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче