login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
January
»
31
Re: [PATCH 09/10] udf: replace udf_*_offset macros with functions
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Jan Kara <jack@...>
To: <marcin.slusarz@...>
Cc: LKML <linux-kernel@...>
Subject:
Re: [PATCH 09/10] udf: replace udf_*_offset macros with functions
Date: Thursday, January 31, 2008 - 12:48 pm
On Wed 30-01-08 22:03:59,
marcin.slusarz@gmail.com
wrote:
quoted text
> - translate udf_file_entry_alloc_offset macro into function > - translate udf_ext0_offset macro into function > - add comment about crypticly named fields in struct udf_inode_info > > Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> > Cc: Jan Kara <jack@suse.cz>
Acked-by: Jan Kara <jack@suse.cz> Honza
quoted text
> --- > fs/udf/udfdecl.h | 29 +++++++++++++++++++---------- > include/linux/udf_fs_i.h | 4 ++-- > 2 files changed, 21 insertions(+), 12 deletions(-) > > diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h > index c6c457b..375be1b 100644 > --- a/fs/udf/udfdecl.h > +++ b/fs/udf/udfdecl.h > @@ -12,6 +12,7 @@ > #include <linux/buffer_head.h> > > #include "udfend.h" > +#include "udf_i.h" > > #define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) ) > #define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) ) > @@ -23,16 +24,24 @@ > #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)) > > diff --git a/include/linux/udf_fs_i.h b/include/linux/udf_fs_i.h > index ffaf056..6281a52 100644 > --- a/include/linux/udf_fs_i.h > +++ b/include/linux/udf_fs_i.h > @@ -27,8 +27,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 > -- > 1.5.3.7 >
-- Jan Kara <jack@suse.cz> SUSE Labs, CR --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 00/10] udf: cleanups
,
, (Wed Jan 30, 5:03 pm)
[PATCH 10/10] udf: constify udf_bitmap_lookup array
,
, (Wed Jan 30, 5:04 pm)
Re: [PATCH 10/10] udf: constify udf_bitmap_lookup array
, Jan Kara
, (Thu Jan 31, 12:52 pm)
Re: [PATCH 10/10] udf: constify udf_bitmap_lookup array
, Marcin Slusarz
, (Sat Feb 2, 5:37 pm)
Re: [PATCH 10/10] udf: constify udf_bitmap_lookup array
, Jan Kara
, (Mon Feb 4, 3:15 pm)
[PATCH 09/10] udf: replace udf_*_offset macros with functions
,
, (Wed Jan 30, 5:03 pm)
Re: [PATCH 09/10] udf: replace udf_*_offset macros with func...
, Jan Kara
, (Thu Jan 31, 12:48 pm)
[PATCH 08/10] udf: simplify __udf_read_inode
,
, (Wed Jan 30, 5:03 pm)
Re: [PATCH 08/10] udf: simplify __udf_read_inode
, Jan Kara
, (Thu Jan 31, 12:46 pm)
[PATCH 07/10] udf: replace all adds to little endians variab...
,
, (Wed Jan 30, 5:03 pm)
Re: [PATCH 07/10] udf: replace all adds to little endians va...
, Jan Kara
, (Thu Jan 31, 12:42 pm)
[PATCH 06/10] udf: truncate: create function for updating of...
,
, (Wed Jan 30, 5:03 pm)
Re: [PATCH 06/10] udf: truncate: create function for updatin...
, Jan Kara
, (Thu Jan 31, 1:08 pm)
Re: [PATCH 06/10] udf: truncate: create function for updatin...
, Marcin Slusarz
, (Thu Jan 31, 2:18 pm)
[PATCH 05/10] udf: simple cleanup of truncate.c
,
, (Wed Jan 30, 5:03 pm)
Re: [PATCH 05/10] udf: simple cleanup of truncate.c
, Jan Kara
, (Thu Jan 31, 9:01 am)
[PATCH 04/10] udf: constify crc
,
, (Wed Jan 30, 5:03 pm)
Re: [PATCH 04/10] udf: constify crc
, Jan Kara
, (Thu Jan 31, 8:58 am)
[PATCH 03/10] udf: udf_CS0toNLS cleanup
,
, (Wed Jan 30, 5:03 pm)
Re: [PATCH 03/10] udf: udf_CS0toNLS cleanup
, Jan Kara
, (Thu Jan 31, 8:23 am)
[PATCH 02/10] udf: fix udf_build_ustr
,
, (Wed Jan 30, 5:03 pm)
Re: [PATCH 02/10] udf: fix udf_build_ustr
, Jan Kara
, (Thu Jan 31, 6:45 am)
Re: [PATCH 02/10] udf: fix udf_build_ustr
, Marcin Slusarz
, (Thu Jan 31, 3:57 pm)
Re: [PATCH 02/10] udf: fix udf_build_ustr
, Jan Kara
, (Mon Feb 4, 3:31 pm)
Re: [PATCH 02/10] udf: fix udf_build_ustr
, Marcin Slusarz
, (Mon Feb 4, 5:27 pm)
Re: [PATCH 02/10] udf: fix udf_build_ustr
, Jan Kara
, (Tue Feb 5, 11:29 am)
Re: [PATCH 02/10] udf: fix udf_build_ustr
, Marcin Slusarz
, (Tue Feb 5, 3:17 pm)
[PATCH 01/10] udf: udf_CS0toUTF8 cleanup
,
, (Wed Jan 30, 5:03 pm)
Re: [PATCH 01/10] udf: udf_CS0toUTF8 cleanup
, Jan Kara
, (Thu Jan 31, 5:57 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Eric W. Biederman
[PATCH 02/10] sysfs: Support for preventing unmounts.
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
git
:
linux-netdev
:
Antonio Almeida
HTB accuracy for high speed
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 26/37] dccp: Integration of dynamic feature activation - part 1 (socket set...
David Miller
[GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
6 users
and
915 guests
online.
Online users
zeekec
Nelson
mercre40
ionut
Jeremy
TapestryPassion
Syndicate