Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91818
b: refs/heads/master
c: d652eef
h: refs/heads/master
v: v3
  • Loading branch information
marcin.slusarz@gmail.com authored and Jan Kara committed Apr 17, 2008
1 parent 53a827e commit bfa7a02
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ab9278570077101d1e367399686be62b22c4019
refs/heads/master: d652eefb70142c64495f4188883f9dfc0430a96b
4 changes: 2 additions & 2 deletions trunk/fs/udf/udf_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ struct udf_inode_info {
__u32 i_next_alloc_block;
__u32 i_next_alloc_goal;
unsigned i_alloc_type : 3;
unsigned i_efe : 1;
unsigned i_use : 1;
unsigned i_efe : 1; /* extendedFileEntry */
unsigned i_use : 1; /* unallocSpaceEntry */
unsigned i_strat4096 : 1;
unsigned reserved : 26;
union {
Expand Down
29 changes: 19 additions & 10 deletions trunk/fs/udf/udfdecl.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "udf_sb.h"
#include "udfend.h"
#include "udf_i.h"

#define UDF_PREALLOCATE
#define UDF_DEFAULT_PREALLOC_BLOCKS 8
Expand Down Expand Up @@ -42,16 +43,24 @@ do { \
#define UDF_NAME_LEN 256
#define UDF_PATH_LEN 1023

#define udf_file_entry_alloc_offset(inode)\
(UDF_I(inode)->i_use ?\
sizeof(struct unallocSpaceEntry) :\
((UDF_I(inode)->i_efe ?\
sizeof(struct extendedFileEntry) :\
sizeof(struct fileEntry)) + UDF_I(inode)->i_lenEAttr))

#define udf_ext0_offset(inode)\
(UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB ?\
udf_file_entry_alloc_offset(inode) : 0)
static inline size_t udf_file_entry_alloc_offset(struct inode *inode)
{
struct udf_inode_info *iinfo = UDF_I(inode);
if (iinfo->i_use)
return sizeof(struct unallocSpaceEntry);
else if (iinfo->i_efe)
return sizeof(struct extendedFileEntry) + iinfo->i_lenEAttr;
else
return sizeof(struct fileEntry) + iinfo->i_lenEAttr;
}

static inline size_t udf_ext0_offset(struct inode *inode)
{
if (UDF_I(inode)->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB)
return udf_file_entry_alloc_offset(inode);
else
return 0;
}

#define udf_get_lb_pblock(sb,loc,offset) udf_get_pblock((sb), (loc).logicalBlockNum, (loc).partitionReferenceNum, (offset))

Expand Down

0 comments on commit bfa7a02

Please sign in to comment.