<commit_before>
#ifndef _ST_H
#define _ST_H

#include <linux/completion.h>
#include <linux/mutex.h>
#include <linux/kref.h>
#include <scsi/scsi_cmnd.h>

/* Descriptor for analyzed sense data */
struct st_cmdstatus {
	int midlevel_result;
	struct scsi_sense_hdr sense_hdr;
	int have_sense;
	int residual;
	u64 uremainder64;
	u8 flags;
	u8 remainder_valid;
	u8 fixed_format;
	u8 deferred;
};

struct scsi_tape;

/* scsi tape command */
struct st_request {
	unsigned char cmd[MAX_COMMAND_SIZE];
	unsigned char sense[SCSI_SENSE_BUFFERSIZE];
	int result;
	struct scsi_tape *stp;
	struct completion *waiting;
	struct bio *bio;
};

/* The tape buffer descriptor. */
struct st_buffer {
	unsigned char dma;	/* DMA-able buffer */
	unsigned char do_dio;   /* direct i/o set up? */
	unsigned char cleared;  /* internal buffer cleared after open? */
	int buffer_size;
	int buffer_blocks;
	int buffer_bytes;
	int read_pointer;
	int writing;
	int syscall_result;
	struct st_request *last_SRpnt;
	struct st_cmdstatus cmdstat;
	struct page **reserved_pages;
	int reserved_page_order;
	struct page **mapped_pages;
	struct rq_map_data map_data;
	unsigned char *b_data;
	unsigned short use_sg;	/* zero or max number of s/g segments for this adapter */
	unsigned short sg_segs;		/* number of segments in s/g list */
	unsigned short frp_segs;	/* number of buffer segments */
};

/* The tape mode definition */
struct st_modedef {
	unsigned char defined;<commit_msg>[SCSI] st: fix memory leak with >1MB tape I/O<commit_after>
#ifndef _ST_H
#define _ST_H

#include <linux/completion.h>
#include <linux/mutex.h>
#include <linux/kref.h>
#include <scsi/scsi_cmnd.h>

/* Descriptor for analyzed sense data */
struct st_cmdstatus {
	int midlevel_result;
	struct scsi_sense_hdr sense_hdr;
	int have_sense;
	int residual;
	u64 uremainder64;
	u8 flags;
	u8 remainder_valid;
	u8 fixed_format;
	u8 deferred;
};

struct scsi_tape;

/* scsi tape command */
struct st_request {
	unsigned char cmd[MAX_COMMAND_SIZE];
	unsigned char sense[SCSI_SENSE_BUFFERSIZE];
	int result;
	struct scsi_tape *stp;
	struct completion *waiting;
	struct bio *bio;
};

/* The tape buffer descriptor. */
struct st_buffer {
	unsigned char dma;	/* DMA-able buffer */
	unsigned char cleared;  /* internal buffer cleared after open? */
	unsigned short do_dio;  /* direct i/o set up? */
	int buffer_size;
	int buffer_blocks;
	int buffer_bytes;
	int read_pointer;
	int writing;
	int syscall_result;
	struct st_request *last_SRpnt;
	struct st_cmdstatus cmdstat;
	struct page **reserved_pages;
	int reserved_page_order;
	struct page **mapped_pages;
	struct rq_map_data map_data;
	unsigned char *b_data;
	unsigned short use_sg;	/* zero or max number of s/g segments for this adapter */
	unsigned short sg_segs;		/* number of segments in s/g list */
	unsigned short frp_segs;	/* number of buffer segments */
};

/* The tape mode definition */
struct st_modedef {
	unsigned char defined;
{'fraction_non_alphanumeric': 0.09150102810143934, 'fraction_numerical': 0.005825908156271419, 'mean_word_length': 4.45607476635514, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6565975', 'n_tokens_mistral': 1047, 'n_tokens_neox': 1018, 'n_words': 325}