1153323Srodrigc/* 2153323Srodrigc * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. 3153323Srodrigc * 4153323Srodrigc * This program is free software; you can redistribute it and/or modify it 5153323Srodrigc * under the terms of version 2 of the GNU General Public License as 6153323Srodrigc * published by the Free Software Foundation. 7153323Srodrigc * 8153323Srodrigc * This program is distributed in the hope that it would be useful, but 9153323Srodrigc * WITHOUT ANY WARRANTY; without even the implied warranty of 10153323Srodrigc * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11153323Srodrigc * 12153323Srodrigc * Further, this software is distributed without any warranty that it is 13153323Srodrigc * free of the rightful claim of any third person regarding infringement 14153323Srodrigc * or the like. Any license provided herein, whether implied or 15153323Srodrigc * otherwise, applies only to this software file. Patent licenses, if 16153323Srodrigc * any, provided herein do not apply to combinations of this program with 17153323Srodrigc * other software, or any other product whatsoever. 18153323Srodrigc * 19153323Srodrigc * You should have received a copy of the GNU General Public License along 20153323Srodrigc * with this program; if not, write the Free Software Foundation, Inc., 59 21153323Srodrigc * Temple Place - Suite 330, Boston MA 02111-1307, USA. 22153323Srodrigc * 23153323Srodrigc * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, 24153323Srodrigc * Mountain View, CA 94043, or: 25153323Srodrigc * 26153323Srodrigc * http://www.sgi.com 27153323Srodrigc * 28153323Srodrigc * For further information regarding this notice, see: 29153323Srodrigc * 30153323Srodrigc * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ 31153323Srodrigc */ 32153323Srodrigc 33153323Srodrigc#include "xfs.h" 34153323Srodrigc 35153323Srodrigc/* 36153323Srodrigc * Stub for no-op vnode operations that return error status. 37153323Srodrigc */ 38153323Srodrigcint 39153323Srodrigcfs_noerr() 40153323Srodrigc{ 41153323Srodrigc return 0; 42153323Srodrigc} 43153323Srodrigc 44153323Srodrigc/* 45153323Srodrigc * Operation unsupported under this file system. 46153323Srodrigc */ 47153323Srodrigcint 48153323Srodrigcfs_nosys() 49153323Srodrigc{ 50153323Srodrigc return ENOSYS; 51153323Srodrigc} 52153323Srodrigc 53153323Srodrigc/* 54153323Srodrigc * Stub for inactive, strategy, and read/write lock/unlock. Does nothing. 55153323Srodrigc */ 56153323Srodrigc/* ARGSUSED */ 57153323Srodrigcvoid 58153323Srodrigcfs_noval() 59153323Srodrigc{ 60153323Srodrigc} 61153323Srodrigc 62153323Srodrigc/* 63153323Srodrigc * vnode pcache layer for vnode_tosspages. 64153323Srodrigc * 'last' parameter unused but left in for IRIX compatibility 65153323Srodrigc */ 66153323Srodrigcvoid 67153323Srodrigcfs_tosspages( 68153323Srodrigc bhv_desc_t *bdp, 69153323Srodrigc xfs_off_t first, 70153323Srodrigc xfs_off_t last, 71153323Srodrigc int fiopt) 72153323Srodrigc{ 73159147Simp#ifdef XXXKAN 74153323Srodrigc vnode_t *vp = BHV_TO_VNODE(bdp); 75153323Srodrigc struct inode *ip = LINVFS_GET_IP(vp); 76153323Srodrigc 77153323Srodrigc if (VN_CACHED(vp)) 78153323Srodrigc truncate_inode_pages(ip->i_mapping, first); 79153323Srodrigc#endif 80153323Srodrigc} 81153323Srodrigc 82153323Srodrigc 83153323Srodrigc/* 84153323Srodrigc * vnode pcache layer for vnode_flushinval_pages. 85153323Srodrigc * 'last' parameter unused but left in for IRIX compatibility 86153323Srodrigc */ 87153323Srodrigcvoid 88153323Srodrigcfs_flushinval_pages( 89153323Srodrigc bhv_desc_t *bdp, 90153323Srodrigc xfs_off_t first, 91153323Srodrigc xfs_off_t last, 92153323Srodrigc int fiopt) 93153323Srodrigc{ 94159147Simp#ifdef XXXKAN 95153323Srodrigc vnode_t *vp = BHV_TO_VNODE(bdp); 96153323Srodrigc struct inode *ip = LINVFS_GET_IP(vp); 97153323Srodrigc 98153323Srodrigc if (VN_CACHED(vp)) { 99153323Srodrigc filemap_fdatasync(ip->i_mapping); 100153323Srodrigc fsync_inode_data_buffers(ip); 101153323Srodrigc filemap_fdatawait(ip->i_mapping); 102153323Srodrigc 103153323Srodrigc truncate_inode_pages(ip->i_mapping, first); 104153323Srodrigc } 105153323Srodrigc#endif 106153323Srodrigc} 107153323Srodrigc 108153323Srodrigc/* 109153323Srodrigc * vnode pcache layer for vnode_flush_pages. 110153323Srodrigc * 'last' parameter unused but left in for IRIX compatibility 111153323Srodrigc */ 112153323Srodrigcint 113153323Srodrigcfs_flush_pages( 114153323Srodrigc bhv_desc_t *bdp, 115153323Srodrigc xfs_off_t first, 116153323Srodrigc xfs_off_t last, 117153323Srodrigc uint64_t flags, 118153323Srodrigc int fiopt) 119153323Srodrigc{ 120159147Simp#ifdef XXXKAN 121153323Srodrigc vnode_t *vp = BHV_TO_VNODE(bdp); 122153323Srodrigc struct inode *ip = LINVFS_GET_IP(vp); 123153323Srodrigc 124153323Srodrigc if (VN_CACHED(vp)) { 125153323Srodrigc filemap_fdatasync(ip->i_mapping); 126153323Srodrigc fsync_inode_data_buffers(ip); 127153323Srodrigc filemap_fdatawait(ip->i_mapping); 128153323Srodrigc } 129153323Srodrigc#endif 130153323Srodrigc return 0; 131153323Srodrigc} 132