/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* bos720 src/bos/kernel/sys/hfd.h 1.1                                    */
/*                                                                        */
/* Licensed Materials - Property of IBM                                   */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 2009                   */
/* All Rights Reserved                                                    */
/*                                                                        */
/* US Government Users Restricted Rights - Use, duplication or            */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.      */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

/* @(#)41	1.1  src/bos/kernel/sys/hfd.h, sysj2, bos720 11/20/09 16:18:48  */

/*
 * COMPONENT_NAME: (SYSJ2) JFS2 Physical File System
 *
 * FUNCTIONS: Hot Files Detection (HFD) subsystem header
 *
 * ORIGINS: 27
 *
 * (C) COPYRIGHT International Business Machines Corp. 2009
 * All Rights Reserved
 * Licensed Materials - Property of IBM
 *                               
 * US Government Users Restricted Rights - Use, duplication or
 * disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 */                              

#ifndef _H_HFD
#define _H_HFD

#include <sys/types.h>
#include <sys/ioctl.h>

#define HFD_GET		_IOR('f', 118, int)		/* get HFD flag */
#define HFD_SET		_IOW('f', 117, int)		/* set HFD flag */
#define HFD_END		_IOW('f', 116, int)		/* terminate HFD */
#define HFD_QRY		_IOR('f', 115, hfdstats_t)	/* qet HFD stats */

/* Hot File Detection (HFD) ioctl specific structs and flags { */

typedef struct per_file_counters {
	ino64_t		c_inode;
	uint64_t	c_rbytes;
	uint64_t	c_wbytes;
	uint64_t	c_rops;
	uint64_t	c_wops;
	uint64_t	c_rtime;
	uint64_t	c_wtime;
	uint32_t	c_unique;
} fstats_t;

typedef struct hfd_stats_request {
	uint64_t	req_count;
	uint32_t	req_flags;
	uint32_t	req_resrvd;
	uint64_t	req_cookie;
	fstats_t	req_stats[1];
} hfdstats_t;

/* } Hot File Detection (HFD) ioctl specific structs and flags */

#endif /* _H_HFD */
