public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH, RFC 2/2] ext4: Convert instrumentation from markers to tracepoints
Date: Mon, 13 Apr 2009 12:29:10 +0530	[thread overview]
Message-ID: <20090413065910.GA23795@skywalker> (raw)
In-Reply-To: <1239479167-804-2-git-send-email-tytso@mit.edu>

On Sat, Apr 11, 2009 at 03:46:07PM -0400, Theodore Ts'o wrote:
.....
......

> diff --git a/include/linux/ext4_trace_types.h b/include/linux/ext4_trace_types.h
> new file mode 100644
> index 0000000..229a2dd
> --- /dev/null
> +++ b/include/linux/ext4_trace_types.h
> @@ -0,0 +1,108 @@
> +/*
> + * ext4_trace_types.h -- these data structures are needed by the
> + *	tracing infrastructure
> + */
> +
> +#ifndef _EXT4_TRACE_TYPES_H
> +#define _EXT4_TRACE_TYPES_H
> +
> +/* data type for block offset of block group */
> +typedef int ext4_grpblk_t;
> +
> +/* data type for filesystem-wide blocks number */
> +typedef unsigned long long ext4_fsblk_t;
> +
> +/* data type for file logical block number */
> +typedef __u32 ext4_lblk_t;
> +
> +/* data type for block group number */
> +typedef unsigned int ext4_group_t;
> +
> +struct ext4_allocation_request {
> +	/* target inode for block we're allocating */
> +	struct inode *inode;
> +	/* logical block in target inode */
> +	ext4_lblk_t logical;
> +	/* phys. target (a hint) */
> +	ext4_fsblk_t goal;
> +	/* the closest logical allocated block to the left */
> +	ext4_lblk_t lleft;
> +	/* phys. block for ^^^ */
> +	ext4_fsblk_t pleft;
> +	/* the closest logical allocated block to the right */
> +	ext4_lblk_t lright;
> +	/* phys. block for ^^^ */
> +	ext4_fsblk_t pright;
> +	/* how many blocks we want to allocate */
> +	unsigned int len;
> +	/* flags. see above EXT4_MB_HINT_* */
> +	unsigned int flags;
> +};
> +
> +struct ext4_free_extent {
> +	ext4_lblk_t fe_logical;
> +	ext4_grpblk_t fe_start;
> +	ext4_group_t fe_group;
> +	int fe_len;
> +};
> +
> +struct ext4_allocation_context {
> +	struct inode *ac_inode;
> +	struct super_block *ac_sb;
> +
> +	/* original request */
> +	struct ext4_free_extent ac_o_ex;
> +
> +	/* goal request (after normalization) */
> +	struct ext4_free_extent ac_g_ex;
> +
> +	/* the best found extent */
> +	struct ext4_free_extent ac_b_ex;
> +
> +	/* copy of the bext found extent taken before preallocation efforts */
> +	struct ext4_free_extent ac_f_ex;
> +
> +	/* number of iterations done. we have to track to limit searching */
> +	unsigned long ac_ex_scanned;
> +	__u16 ac_groups_scanned;
> +	__u16 ac_found;
> +	__u16 ac_tail;
> +	__u16 ac_buddy;
> +	__u16 ac_flags;		/* allocation hints */
> +	__u8 ac_status;
> +	__u8 ac_criteria;
> +	__u8 ac_repeats;
> +	__u8 ac_2order;		/* if request is to allocate 2^N blocks and
> +				 * N > 0, the field stores N, otherwise 0 */
> +	__u8 ac_op;		/* operation, for history only */
> +	struct page *ac_bitmap_page;
> +	struct page *ac_buddy_page;
> +	/*
> +	 * pointer to the held semaphore upon successful
> +	 * block allocation
> +	 */
> +	struct rw_semaphore *alloc_semp;
> +	struct ext4_prealloc_space *ac_pa;
> +	struct ext4_locality_group *ac_lg;
> +};
> +
> +struct ext4_prealloc_space {
> +	struct list_head	pa_inode_list;
> +	struct list_head	pa_group_list;
> +	union {
> +		struct list_head pa_tmp_list;
> +		struct rcu_head	pa_rcu;
> +	} u;
> +	spinlock_t		pa_lock;
> +	atomic_t		pa_count;
> +	unsigned		pa_deleted;
> +	ext4_fsblk_t		pa_pstart;	/* phys. block */
> +	ext4_lblk_t		pa_lstart;	/* log. block */
> +	unsigned short		pa_len;		/* len of preallocated chunk */
> +	unsigned short		pa_free;	/* how many blocks are free */
> +	unsigned short		pa_type;	/* pa type. inode or group */
> +	spinlock_t		*pa_obj_lock;
> +	struct inode		*pa_inode;	/* hack, for history only */
> +};
> +
> +#endif /* _EXT4_TRACE_TYPES_H */

We moved all the ext4 headers to fs/ext4/  Can this be
fs/ext4/ext4_trace_types.h ?

-aneesh

  reply	other threads:[~2009-04-13  6:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-11 19:46 [PATCH, RFC 1/2] jbd2: Convert instrumentation from markers to tracepoints Theodore Ts'o
2009-04-11 19:46 ` [PATCH, RFC 2/2] ext4: " Theodore Ts'o
2009-04-13  6:59   ` Aneesh Kumar K.V [this message]
2009-04-13 10:14     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090413065910.GA23795@skywalker \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox