From: adilger Date: Tue, 1 Oct 2002 06:44:47 +0000 (+0000) Subject: Add export from obdfilter to hold open file handles. X-Git-Tag: v1_7_100~4647 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6bea5dbe30d4ecc44e2dfaa7f0686caaa0886f5b;p=fs%2Flustre-release.git Add export from obdfilter to hold open file handles. Add dentry data so we can track destroy-while-file-open. --- diff --git a/lustre/include/linux/obd_filter.h b/lustre/include/linux/obd_filter.h index b87c50e..d37a198 100644 --- a/lustre/include/linux/obd_filter.h +++ b/lustre/include/linux/obd_filter.h @@ -1,18 +1,51 @@ -#ifndef _OBD_FILTER_H -#define _OBD_FILTER_H -/* - * Copyright (C) 2001 Cluster File Systems, Inc. +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * Copyright (C) 2002 Cluster File Systems, Inc. + * + * This file is part of Lustre, http://www.lustre.org. + * + * Lustre is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * Lustre is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Lustre; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * This code is issued under the GNU General Public License. - * See the file COPYING in this distribution */ -#include +#ifndef _OBD_FILTER_H +#define _OBD_FILTER_H #ifndef OBD_FILTER_DEVICENAME #define OBD_FILTER_DEVICENAME "obdfilter" #endif -extern struct obd_ops filter_obd_ops; +/* In-memory access to client data from OST struct */ +struct filter_export_data { + struct list_head fed_open_head; /* files to close on disconnect */ + spinlock_t fed_lock; +}; + +/* file data for open files on OST */ +struct filter_file_data { + struct list_head ffd_dentry_list; /* dentry open list */ + struct list_head ffd_export_list; /* export open list */ + struct file *ffd_file; /* file handle */ + __u64 ffd_servercookie; /* cookie for lustre handle */ +}; + +struct filter_dentry_data { + struct list_head fdd_open_head; /* files that have this dentry open */ + int fdd_flags; +}; + +#define FILTER_FLAG_DESTROY 0x0001 /* destroy dentry on last file close */ #endif