Whamcloud - gitweb
Add export from obdfilter to hold open file handles.
authoradilger <adilger>
Tue, 1 Oct 2002 06:44:47 +0000 (06:44 +0000)
committeradilger <adilger>
Tue, 1 Oct 2002 06:44:47 +0000 (06:44 +0000)
Add dentry data so we can track destroy-while-file-open.

lustre/include/linux/obd_filter.h

index b87c50e..d37a198 100644 (file)
@@ -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 <linux/obd_class.h>
+#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