Re: [PATCH 1/9] exofs: osd Swiss army knife

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun 2009-01-04 10:43:09, Boaz Harrosh wrote:
> Pavel Machek wrote:
> > Hi!
> > 
> >>> In this patch are all the osd infrastructure that will be used later
> >>> by the file system.
> >>>
> >>> Also the declarations of constants, on disk structures, and prototypes.
> >>>
> >>> And the Kbuild+Kconfig files needed to build the exofs module.
> >>>
> >>>
> >>> ...
> >>>
> >>> +struct exofs_sb_info {
> >>> +	struct osd_dev	*s_dev;			/* returned by get_osd_dev    */
> >>> +	uint64_t	s_pid;			/* partition ID of file system*/
> >>> +	int		s_timeout;		/* timeout for OSD operations */
> >>> +	uint32_t	s_nextid;		/* highest object ID used     */
> >>> +	uint32_t	s_numfiles;		/* number of files on fs      */
> >>> +	spinlock_t	s_next_gen_lock;	/* spinlock for gen # update  */
> >>> +	u32		s_next_generation;	/* next gen # to use          */
> >>> +	atomic_t	s_curr_pending;		/* number of pending commands */
> >>> +	uint8_t		s_cred[OSD_CAP_LEN];	/* all-powerful credential    */
> >>> +};
> >>> +
> >>> +/*
> >>> + * our inode flags
> >>> + */
> >>> +#ifdef ARCH_HAS_ATOMIC_UNSIGNED
> >> This doesn't exist, and it would be fairly bad to introduce it.  Please
> >> kill the ifdefs.
> >>
> >>> +typedef unsigned exofs_iflags_t;
> >>> +#else
> >>> +typedef unsigned long exofs_iflags_t;
> >>> +#endif
> >> Then please kill the typedef altogether and replace it with `unsigned
> >> long' everywhere
> > 
> > Hmmm.. .and at a note somewhere that we assume unsigned long to be atomic...?
> > 
> 
> I think I'll just use unsigned. It's more then enough I'm not using more then 3
> bits for now. Is unsigned workable for all ARCHs?

Please just use atomic_t.

(see "atomics: document that linux expects certain atomic behaviour"
thread for discussion)
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux