2
* Copyright (C) 2008 Junjiro Okajima
4
* This program, aufs is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
* special handling inode attributes on XFS branch in linux-2.6.24 and later
22
* $Id: br_xfs.c,v 1.2 2008/04/21 01:33:00 sfjro Exp $
27
/* h_mnt can be NULL, is it safe? */
28
dev_t au_h_rdev(struct inode *h_inode, struct vfsmount *h_mnt,
29
struct dentry *h_dentry)
35
LKTRTrace("hi%lu\n", h_inode->i_ino);
37
LKTRTrace("%.*s\n", AuDLNPair(h_dentry));
39
rdev = h_inode->i_rdev;
40
if (!rdev || !au_test_xfs(h_inode->i_sb))
46
h_dentry = d_find_alias(h_inode);
47
if (unlikely(!h_dentry))
49
err = PTR_ERR(h_dentry);
50
if (IS_ERR(h_dentry)) {
54
LKTRTrace("%.*s\n", AuDLNPair(h_dentry));
58
err = vfsub_getattr(h_mnt, h_dentry, &st, /*dlgt*/0);
62
goto out; /* success */
66
AuIOErr("failed rdev for XFS inode, hi%lu, %d\n", h_inode->i_ino, err);