rpms/kernel/devel linux-2.6-mm-udf-fixes.patch, NONE, 1.1 kernel-2.6.spec, 1.3117, 1.3118
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Apr 27 21:10:16 UTC 2007
- Previous message (by thread): rpms/kernel/FC-6 linux-2.6-forwarding_of_ip_summed.patch, NONE, 1.1.2.1 linux-2.6-kill_skbuff_hack.patch, NONE, 1.1.2.1 linux-2.6-treat_partial_as_unnecessary.patch, NONE, 1.1.2.1 linux-2.6-use_csum_start_offset_instead.patch, NONE, 1.1.2.1 kernel-2.6.spec, 1.2947, 1.2947.2.1
- Next message (by thread): rpms/kernel/FC-5 linux-2.6.20.10-unoffical.patch, NONE, 1.1 kernel-2.6.spec, 1.2315, 1.2316
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: davej
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv20782
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-mm-udf-fixes.patch
Log Message:
* Fri Apr 27 2007 Dave Jones <davej at redhat.com>
- Allow large files on UDF.
linux-2.6-mm-udf-fixes.patch:
balloc.c | 177 ++++++++----------
dir.c | 39 ++--
directory.c | 30 +--
inode.c | 581 ++++++++++++++++++++++++++++++++++++------------------------
misc.c | 6
namei.c | 226 +++++++++++------------
partition.c | 2
super.c | 75 +++----
symlink.c | 2
truncate.c | 206 +++++++++------------
udf_sb.h | 2
udfdecl.h | 25 +-
12 files changed, 731 insertions(+), 640 deletions(-)
--- NEW FILE linux-2.6-mm-udf-fixes.patch ---
Index: linux-2.6.20.noarch/fs/udf/dir.c
===================================================================
--- linux-2.6.20.noarch.orig/fs/udf/dir.c 2007-02-04 13:44:54.000000000 -0500
+++ linux-2.6.20.noarch/fs/udf/dir.c 2007-03-28 15:15:29.000000000 -0400
@@ -111,11 +111,13 @@ do_udf_readdir(struct inode * dir, struc
uint16_t liu;
uint8_t lfi;
loff_t size = (udf_ext0_offset(dir) + dir->i_size) >> 2;
- struct buffer_head * bh = NULL, * tmp, * bha[16];
- kernel_lb_addr bloc, eloc;
- uint32_t extoffset, elen, offset;
+ struct buffer_head *tmp, *bha[16];
+ kernel_lb_addr eloc;
+ uint32_t elen;
+ sector_t offset;
int i, num;
unsigned int dt_type;
+ struct extent_position epos = { NULL, 0, {0, 0}};
if (nf_pos >= size)
return 0;
@@ -127,23 +129,22 @@ do_udf_readdir(struct inode * dir, struc
if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)
fibh.sbh = fibh.ebh = NULL;
else if (inode_bmap(dir, nf_pos >> (dir->i_sb->s_blocksize_bits - 2),
- &bloc, &extoffset, &eloc, &elen, &offset, &bh) == (EXT_RECORDED_ALLOCATED >> 30))
+ &epos, &eloc, &elen, &offset) == (EXT_RECORDED_ALLOCATED >> 30))
{
- offset >>= dir->i_sb->s_blocksize_bits;
block = udf_get_lb_pblock(dir->i_sb, eloc, offset);
if ((++offset << dir->i_sb->s_blocksize_bits) < elen)
{
if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_SHORT)
- extoffset -= sizeof(short_ad);
+ epos.offset -= sizeof(short_ad);
else if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_LONG)
- extoffset -= sizeof(long_ad);
+ epos.offset -= sizeof(long_ad);
}
else
offset = 0;
if (!(fibh.sbh = fibh.ebh = udf_tread(dir->i_sb, block)))
{
- udf_release_data(bh);
+ brelse(epos.bh);
return -EIO;
}
@@ -171,7 +172,7 @@ do_udf_readdir(struct inode * dir, struc
}
else
{
- udf_release_data(bh);
+ brelse(epos.bh);
return -ENOENT;
}
@@ -179,14 +180,14 @@ do_udf_readdir(struct inode * dir, struc
{
filp->f_pos = nf_pos + 1;
- fi = udf_fileident_read(dir, &nf_pos, &fibh, &cfi, &bloc, &extoffset, &eloc, &elen, &offset, &bh);
+ fi = udf_fileident_read(dir, &nf_pos, &fibh, &cfi, &epos, &eloc, &elen, &offset);
if (!fi)
{
if (fibh.sbh != fibh.ebh)
- udf_release_data(fibh.ebh);
- udf_release_data(fibh.sbh);
- udf_release_data(bh);
+ brelse(fibh.ebh);
+ brelse(fibh.sbh);
+ brelse(epos.bh);
return 0;
}
@@ -244,9 +245,9 @@ do_udf_readdir(struct inode * dir, struc
if (filldir(dirent, fname, flen, filp->f_pos, iblock, dt_type) < 0)
{
if (fibh.sbh != fibh.ebh)
- udf_release_data(fibh.ebh);
- udf_release_data(fibh.sbh);
- udf_release_data(bh);
+ brelse(fibh.ebh);
+ brelse(fibh.sbh);
+ brelse(epos.bh);
return 0;
}
}
@@ -255,9 +256,9 @@ do_udf_readdir(struct inode * dir, struc
filp->f_pos = nf_pos + 1;
if (fibh.sbh != fibh.ebh)
- udf_release_data(fibh.ebh);
- udf_release_data(fibh.sbh);
- udf_release_data(bh);
+ brelse(fibh.ebh);
+ brelse(fibh.sbh);
+ brelse(epos.bh);
return 0;
}
Index: linux-2.6.20.noarch/fs/udf/directory.c
===================================================================
--- linux-2.6.20.noarch.orig/fs/udf/directory.c 2007-02-04 13:44:54.000000000 -0500
+++ linux-2.6.20.noarch/fs/udf/directory.c 2007-03-28 15:15:29.000000000 -0400
@@ -36,14 +36,14 @@ udf_filead_read(struct inode *dir, uint8
if (!ad)
{
- udf_release_data(*bh);
+ brelse(*bh);
*error = 1;
return NULL;
}
if (*offset == dir->i_sb->s_blocksize)
{
- udf_release_data(*bh);
+ brelse(*bh);
block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos);
if (!block)
return NULL;
@@ -57,7 +57,7 @@ udf_filead_read(struct inode *dir, uint8
remainder = dir->i_sb->s_blocksize - loffset;
memcpy((uint8_t *)ad, (*bh)->b_data + loffset, remainder);
- udf_release_data(*bh);
+ brelse(*bh);
block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos);
if (!block)
return NULL;
@@ -75,9 +75,9 @@ struct fileIdentDesc *
udf_fileident_read(struct inode *dir, loff_t *nf_pos,
struct udf_fileident_bh *fibh,
struct fileIdentDesc *cfi,
- kernel_lb_addr *bloc, uint32_t *extoffset,
+ struct extent_position *epos,
kernel_lb_addr *eloc, uint32_t *elen,
- uint32_t *offset, struct buffer_head **bh)
+ sector_t *offset)
{
struct fileIdentDesc *fi;
int i, num, block;
@@ -105,13 +105,11 @@ udf_fileident_read(struct inode *dir, lo
if (fibh->eoffset == dir->i_sb->s_blocksize)
{
- int lextoffset = *extoffset;
+ int lextoffset = epos->offset;
- if (udf_next_aext(dir, bloc, extoffset, eloc, elen, bh, 1) !=
+ if (udf_next_aext(dir, epos, eloc, elen, 1) !=
(EXT_RECORDED_ALLOCATED >> 30))
- {
return NULL;
- }
block = udf_get_lb_pblock(dir->i_sb, *eloc, *offset);
@@ -120,9 +118,9 @@ udf_fileident_read(struct inode *dir, lo
if ((*offset << dir->i_sb->s_blocksize_bits) >= *elen)
*offset = 0;
else
- *extoffset = lextoffset;
+ epos->offset = lextoffset;
- udf_release_data(fibh->sbh);
+ brelse(fibh->sbh);
if (!(fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block)))
return NULL;
fibh->soffset = fibh->eoffset = 0;
@@ -151,7 +149,7 @@ udf_fileident_read(struct inode *dir, lo
}
else if (fibh->sbh != fibh->ebh)
{
- udf_release_data(fibh->sbh);
+ brelse(fibh->sbh);
fibh->sbh = fibh->ebh;
}
@@ -169,13 +167,11 @@ udf_fileident_read(struct inode *dir, lo
}
else if (fibh->eoffset > dir->i_sb->s_blocksize)
{
- int lextoffset = *extoffset;
+ int lextoffset = epos->offset;
- if (udf_next_aext(dir, bloc, extoffset, eloc, elen, bh, 1) !=
+ if (udf_next_aext(dir, epos, eloc, elen, 1) !=
(EXT_RECORDED_ALLOCATED >> 30))
- {
return NULL;
- }
block = udf_get_lb_pblock(dir->i_sb, *eloc, *offset);
@@ -184,7 +180,7 @@ udf_fileident_read(struct inode *dir, lo
[...2590 lines suppressed...]
+ brelse(bh);
}
for (i=0; i<VDS_POS_LENGTH; i++)
{
@@ -1269,10 +1269,10 @@ udf_process_sequence(struct super_block
gd = (struct generic_desc *)bh2->b_data;
if (ident == TAG_IDENT_PD)
udf_load_partdesc(sb, bh2);
- udf_release_data(bh2);
+ brelse(bh2);
}
}
- udf_release_data(bh);
+ brelse(bh);
}
}
@@ -1335,7 +1335,7 @@ udf_load_partition(struct super_block *s
reserve_e = reserve_e >> sb->s_blocksize_bits;
reserve_e += reserve_s;
- udf_release_data(bh);
+ brelse(bh);
/* Process the main & reserve sequences */
/* responsible for finding the PartitionDesc(s) */
@@ -1405,12 +1405,14 @@ udf_load_partition(struct super_block *s
pos = udf_block_map(UDF_SB_VAT(sb), 0);
bh = sb_bread(sb, pos);
+ if (!bh)
+ return 1;
UDF_SB_TYPEVIRT(sb,i).s_start_offset =
le16_to_cpu(((struct virtualAllocationTable20 *)bh->b_data + udf_ext0_offset(UDF_SB_VAT(sb)))->lengthHeader) +
udf_ext0_offset(UDF_SB_VAT(sb));
UDF_SB_TYPEVIRT(sb,i).s_num_entries = (UDF_SB_VAT(sb)->i_size -
UDF_SB_TYPEVIRT(sb,i).s_start_offset) >> 2;
- udf_release_data(bh);
+ brelse(bh);
}
UDF_SB_PARTROOT(sb,i) = udf_get_pblock(sb, 0, i, 0);
UDF_SB_PARTLEN(sb,i) = UDF_SB_PARTLEN(sb,ino.partitionReferenceNum);
@@ -1663,7 +1665,7 @@ static int udf_fill_super(struct super_b
iput(inode);
goto error_out;
}
- sb->s_maxbytes = 1<<30;
+ sb->s_maxbytes = MAX_LFS_FILESIZE;
return 0;
error_out:
@@ -1682,7 +1684,7 @@ error_out:
if (UDF_SB_PARTTYPE(sb, UDF_SB_PARTITION(sb)) == UDF_SPARABLE_MAP15)
{
for (i=0; i<4; i++)
- udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]);
+ brelse(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]);
}
}
#ifdef CONFIG_UDF_NLS
@@ -1691,7 +1693,7 @@ error_out:
#endif
if (!(sb->s_flags & MS_RDONLY))
udf_close_lvid(sb);
- udf_release_data(UDF_SB_LVIDBH(sb));
+ brelse(UDF_SB_LVIDBH(sb));
UDF_SB_FREE(sb);
kfree(sbi);
sb->s_fs_info = NULL;
@@ -1760,7 +1762,7 @@ udf_put_super(struct super_block *sb)
if (UDF_SB_PARTTYPE(sb, UDF_SB_PARTITION(sb)) == UDF_SPARABLE_MAP15)
{
for (i=0; i<4; i++)
- udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]);
+ brelse(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]);
}
}
#ifdef CONFIG_UDF_NLS
@@ -1769,7 +1771,7 @@ udf_put_super(struct super_block *sb)
#endif
if (!(sb->s_flags & MS_RDONLY))
udf_close_lvid(sb);
- udf_release_data(UDF_SB_LVIDBH(sb));
+ brelse(UDF_SB_LVIDBH(sb));
UDF_SB_FREE(sb);
kfree(sb->s_fs_info);
sb->s_fs_info = NULL;
@@ -1839,7 +1841,7 @@ udf_count_free_bitmap(struct super_block
}
else if (ident != TAG_IDENT_SBD)
{
- udf_release_data(bh);
+ brelse(bh);
printk(KERN_ERR "udf: udf_count_free failed\n");
goto out;
}
@@ -1861,7 +1863,7 @@ udf_count_free_bitmap(struct super_block
}
if ( bytes )
{
- udf_release_data(bh);
+ brelse(bh);
newblock = udf_get_lb_pblock(sb, loc, ++block);
bh = udf_tread(sb, newblock);
if (!bh)
@@ -1873,7 +1875,7 @@ udf_count_free_bitmap(struct super_block
ptr = (uint8_t *)bh->b_data;
}
}
- udf_release_data(bh);
+ brelse(bh);
out:
unlock_kernel();
@@ -1885,21 +1887,20 @@ static unsigned int
udf_count_free_table(struct super_block *sb, struct inode * table)
{
unsigned int accum = 0;
- uint32_t extoffset, elen;
- kernel_lb_addr bloc, eloc;
+ uint32_t elen;
+ kernel_lb_addr eloc;
int8_t etype;
- struct buffer_head *bh = NULL;
+ struct extent_position epos;
lock_kernel();
- bloc = UDF_I_LOCATION(table);
- extoffset = sizeof(struct unallocSpaceEntry);
+ epos.block = UDF_I_LOCATION(table);
+ epos.offset = sizeof(struct unallocSpaceEntry);
+ epos.bh = NULL;
- while ((etype = udf_next_aext(table, &bloc, &extoffset, &eloc, &elen, &bh, 1)) != -1)
- {
+ while ((etype = udf_next_aext(table, &epos, &eloc, &elen, 1)) != -1)
accum += (elen >> table->i_sb->s_blocksize_bits);
- }
- udf_release_data(bh);
+ brelse(epos.bh);
unlock_kernel();
Index: linux-2.6.20.noarch/fs/udf/misc.c
===================================================================
--- linux-2.6.20.noarch.orig/fs/udf/misc.c 2007-02-04 13:44:54.000000000 -0500
+++ linux-2.6.20.noarch/fs/udf/misc.c 2007-03-28 15:15:29.000000000 -0400
@@ -274,12 +274,6 @@ udf_read_ptagged(struct super_block *sb,
loc.logicalBlockNum + offset, ident);
}
-void udf_release_data(struct buffer_head *bh)
-{
- if (bh)
- brelse(bh);
-}
-
void udf_update_tag(char *data, int length)
{
tag *tptr = (tag *)data;
Index: linux-2.6.20.noarch/fs/udf/partition.c
===================================================================
--- linux-2.6.20.noarch.orig/fs/udf/partition.c 2007-02-04 13:44:54.000000000 -0500
+++ linux-2.6.20.noarch/fs/udf/partition.c 2007-03-28 15:15:29.000000000 -0400
@@ -81,7 +81,7 @@ uint32_t udf_get_pblock_virt15(struct su
loc = le32_to_cpu(((__le32 *)bh->b_data)[index]);
- udf_release_data(bh);
+ brelse(bh);
if (UDF_I_LOCATION(UDF_SB_VAT(sb)).partitionReferenceNum == partition)
{
Index: linux-2.6.20.noarch/fs/udf/symlink.c
===================================================================
--- linux-2.6.20.noarch.orig/fs/udf/symlink.c 2007-02-04 13:44:54.000000000 -0500
+++ linux-2.6.20.noarch/fs/udf/symlink.c 2007-03-28 15:15:29.000000000 -0400
@@ -95,7 +95,7 @@ static int udf_symlink_filler(struct fil
}
udf_pc_to_char(inode->i_sb, symlink, inode->i_size, p);
- udf_release_data(bh);
+ brelse(bh);
unlock_kernel();
SetPageUptodate(page);
Index: linux-2.6.20.noarch/fs/udf/udf_sb.h
===================================================================
--- linux-2.6.20.noarch.orig/fs/udf/udf_sb.h 2007-02-04 13:44:54.000000000 -0500
+++ linux-2.6.20.noarch/fs/udf/udf_sb.h 2007-03-28 15:15:29.000000000 -0400
@@ -93,7 +93,7 @@ static inline struct udf_sb_info *UDF_SB
for (i=0; i<nr_groups; i++)\
{\
if (UDF_SB_BITMAP(X,Y,Z,i))\
- udf_release_data(UDF_SB_BITMAP(X,Y,Z,i));\
+ brelse(UDF_SB_BITMAP(X,Y,Z,i));\
}\
if (size <= PAGE_SIZE)\
kfree(UDF_SB_PARTMAPS(X)[Y].Z.s_bitmap);\
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3117
retrieving revision 1.3118
diff -u -r1.3117 -r1.3118
--- kernel-2.6.spec 27 Apr 2007 19:16:57 -0000 1.3117
+++ kernel-2.6.spec 27 Apr 2007 21:10:09 -0000 1.3118
@@ -556,6 +556,7 @@
Patch1630: linux-2.6-kvm-19.patch
Patch1640: linux-2.6-module-override-modparam-cmdline.patch
Patch1650: linux-2.6-serial-460800.patch
+Patch1660: linux-2.6-mm-udf-fixes.patch
Patch1681: linux-2.6-xfs-umount-fix.patch
Patch1690: linux-2.6-PT_LOAD-align.patch
Patch1700: linux-2.6-dvb-spinlock.patch
@@ -1268,6 +1269,8 @@
#%patch1640 -p1
# Allow to use 480600 baud on 16C950 UARTs
%patch1650 -p1
+# Allow large files on UDF
+%patch1660 -p1
# Fix XFS umount bug.
%patch1681 -p1
# Align kernel data segment to page boundary.
@@ -2331,6 +2334,9 @@
# - tux.
%changelog
+* Fri Apr 27 2007 Dave Jones <davej at redhat.com>
+- Allow large files on UDF.
+
* Fri Apr 27 2007 John W. Linville <linville at redhat.com>
- Update git-iwlwifi.patch (and update git-iwlwifi-fixes.patch to match)
- Previous message (by thread): rpms/kernel/FC-6 linux-2.6-forwarding_of_ip_summed.patch, NONE, 1.1.2.1 linux-2.6-kill_skbuff_hack.patch, NONE, 1.1.2.1 linux-2.6-treat_partial_as_unnecessary.patch, NONE, 1.1.2.1 linux-2.6-use_csum_start_offset_instead.patch, NONE, 1.1.2.1 kernel-2.6.spec, 1.2947, 1.2947.2.1
- Next message (by thread): rpms/kernel/FC-5 linux-2.6.20.10-unoffical.patch, NONE, 1.1 kernel-2.6.spec, 1.2315, 1.2316
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list