Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28433
b: refs/heads/master
c: 34327e1
h: refs/heads/master
i:
  28431: 1df5f01
v: v3
  • Loading branch information
Nathan Scott committed Jun 9, 2006
1 parent 9990e7d commit deaad64
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8285fb58e75bfdb447c7a2c533ec9efdb238f966
refs/heads/master: 34327e138481137a81a2e33060b8eb0944013801
4 changes: 2 additions & 2 deletions trunk/fs/xfs/linux-2.6/xfs_lrw.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,11 @@ xfs_write(
io = &xip->i_iocore;
mp = io->io_mount;

vfs_wait_for_freeze(vp->v_vfsp, SB_FREEZE_WRITE);

if (XFS_FORCED_SHUTDOWN(mp))
return -EIO;

fs_check_frozen(vp->v_vfsp, SB_FREEZE_WRITE);

if (ioflags & IO_ISDIRECT) {
xfs_buftarg_t *target =
(xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ?
Expand Down
7 changes: 3 additions & 4 deletions trunk/fs/xfs/linux-2.6/xfs_vfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, bhv_desc_t *, int);
extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int);
extern void vfs_freeze(bhv_desc_t *);

#define vfs_test_for_freeze(vfs) ((vfs)->vfs_super->s_frozen)
#define vfs_wait_for_freeze(vfs,l) vfs_check_frozen((vfs)->vfs_super, (l))

typedef struct bhv_module_vfsops {
struct bhv_vfsops bhv_common;
void * bhv_custom;
Expand All @@ -211,8 +214,4 @@ extern void bhv_insert_all_vfsops(struct bhv_vfs *);
extern void bhv_remove_all_vfsops(struct bhv_vfs *, int);
extern void bhv_remove_vfsops(struct bhv_vfs *, int);

#define fs_frozen(vfsp) ((vfsp)->vfs_super->s_frozen)
#define fs_check_frozen(vfsp, level) \
vfs_check_frozen(vfsp->vfs_super, level);

#endif /* __XFS_VFS_H__ */
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ xfs_log_need_covered(xfs_mount_t *mp)
xlog_t *log = mp->m_log;
bhv_vfs_t *vfsp = XFS_MTOVFS(mp);

if (fs_frozen(vfsp) || XFS_FORCED_SHUTDOWN(mp) ||
if (vfs_test_for_freeze(vfsp) || XFS_FORCED_SHUTDOWN(mp) ||
(vfsp->vfs_flag & VFS_RDONLY))
return 0;

Expand Down
17 changes: 5 additions & 12 deletions trunk/fs/xfs/xfs_trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,8 @@ xfs_trans_alloc(
xfs_mount_t *mp,
uint type)
{
fs_check_frozen(XFS_MTOVFS(mp), SB_FREEZE_TRANS);
atomic_inc(&mp->m_active_trans);

return (_xfs_trans_alloc(mp, type));

vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_TRANS);
return _xfs_trans_alloc(mp, type);
}

xfs_trans_t *
Expand All @@ -250,21 +247,17 @@ _xfs_trans_alloc(
{
xfs_trans_t *tp;

ASSERT(xfs_trans_zone != NULL);
tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP);
atomic_inc(&mp->m_active_trans);

/*
* Initialize the transaction structure.
*/
tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP);
tp->t_magic = XFS_TRANS_MAGIC;
tp->t_type = type;
tp->t_mountp = mp;
tp->t_items_free = XFS_LIC_NUM_SLOTS;
tp->t_busy_free = XFS_LBC_NUM_SLOTS;
XFS_LIC_INIT(&(tp->t_items));
XFS_LBC_INIT(&(tp->t_busy));

return (tp);
return tp;
}

/*
Expand Down

0 comments on commit deaad64

Please sign in to comment.