Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18150
b: refs/heads/master
c: e13a73f
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Nathan Scott committed Jan 11, 2006
1 parent 63e3050 commit 07624a7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1df84c930a5101223da016f256b46b192dbf2b30
refs/heads/master: e13a73f02595c564e423bda5742fb8df4ebca455
26 changes: 26 additions & 0 deletions trunk/fs/xfs/xfs_fsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,32 @@ xfs_reserve_blocks(
return(0);
}

void
xfs_fs_log_dummy(xfs_mount_t *mp)
{
xfs_trans_t *tp;
xfs_inode_t *ip;


tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1);
atomic_inc(&mp->m_active_trans);
if (xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0)) {
xfs_trans_cancel(tp, 0);
return;
}

ip = mp->m_rootip;
xfs_ilock(ip, XFS_ILOCK_EXCL);

xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
xfs_trans_ihold(tp, ip);
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
xfs_trans_set_sync(tp);
xfs_trans_commit(tp, 0, NULL);

xfs_iunlock(ip, XFS_ILOCK_EXCL);
}

int
xfs_fs_goingdown(
xfs_mount_t *mp,
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/xfs/xfs_fsops.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ extern int xfs_fs_counts(xfs_mount_t *mp, xfs_fsop_counts_t *cnt);
extern int xfs_reserve_blocks(xfs_mount_t *mp, __uint64_t *inval,
xfs_fsop_resblks_t *outval);
extern int xfs_fs_goingdown(xfs_mount_t *mp, __uint32_t inflags);
extern void xfs_fs_log_dummy(xfs_mount_t *mp);

#endif /* __XFS_FSOPS_H__ */
2 changes: 2 additions & 0 deletions trunk/fs/xfs/xfs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include "xfs_acl.h"
#include "xfs_attr.h"
#include "xfs_clnt.h"
#include "xfs_fsops.h"

STATIC int xfs_sync(bhv_desc_t *, int, cred_t *);

Expand Down Expand Up @@ -1967,6 +1968,7 @@ xfs_freeze(
/* Push the superblock and write an unmount record */
xfs_log_unmount_write(mp);
xfs_unmountfs_writesb(mp);
xfs_fs_log_dummy(mp);
}


Expand Down

0 comments on commit 07624a7

Please sign in to comment.