xfs: log space validation
v2 cover xfs: log space validation
Hello,
This is version 2 of fix log space calculation if the log stripe unit is specified.
I changed the subject in this round since there are many changes belong to the log space reservation interface adjustment.
Major changes of v2->v1:
- The interface of xfs_trans_reserve() has been changed to:
xfs_trans_reserve(struct xfs_trans *tp, xfs_trans_res *tres, int blocks, int rtextents);
- Introduce a new inline helper m_tresp() to fetch pointer of mp->m_reservations structure, so that we don't need a big code change if someday we rename m_reservations to another name.
- Introduce xfs_log_rlimit.[c|h] to isolate the maximum transaction log space validation related routines. There are two functions can be shared with the user space which are:
void xfs_log_adjust_max_attrsetm_res();
void xfs_log_get_max_trans_res();
- Calculate the maximum length in bytes that would be required for a local attribute value as large attributes out of line are not logged according to Dave's advise.
- Don't return if the given log space at mount time is too small, drop a message via syslog in critical level instead.
Testing:
xfstests/generic and xfs specified test cases(except a dozens of cases need a tap device or xfsdump) works without panic.
[PATCH 1/8] xfs: Introduce a new structure to hold transaction reservation items [PATCH 2/8] xfs: Introduce tr_fsyncts to m_reservation
[PATCH 3/8] xfs: Make writeid transaction use tr_writeid
[PATCH 4/8] xfs: Refactor xfs_trans_reserve() interface
[PATCH 5/8] xfs: Get rid of all XFS_XXX_LOG_RES() macros
[PATCH 6/8] xfs: Refactor xfs_ticket_alloc() to extract a new helper [PATCH 7/8] xfs: Add xfs_log_rlimit.[c|h]
[PATCH 8/8] xfs: Validate log space at mount time
The patches of user space sync up with those kernel space change will be sent out later as I have to go out to deal with a urgent thing right now.
v1:
http://comments.gmane.org/gmane.comp.file-systems.xfs.general/52201
Thanks,
-Jeff
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 6 lines · Jeff Liu
Hello,
This is version 2 of fix log space calculation if the log stripe unit is specified.
I changed the subject in this round since there are many changes belong to the log space reservation interface adjustment.
Hi Jeff,
Given that I'm in the middle of reworking the kernel and userspace source structures, do you might if I pull this patchset into my tree for 3.11 and rework it to fit the modified structure I have now? I'll do the same with the userspace patch if you have no objections.
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Hi Dave,
Quoted 8 lines · Dave Chinner
Quoted 6 lines · Jeff Liu
Hello,
This is version 2 of fix log space calculation if the log stripe unit is specified.
I changed the subject in this round since there are many changes belong to the log space reservation interface adjustment.
Quoted 6 lines
Hi Jeff,
Given that I'm in the middle of reworking the kernel and userspace source structures, do you might if I pull this patchset into my tree for 3.11 and rework it to fit the modified structure I have now? I'll do the same with the userspace patch if you have no objections.
That sounded fine to me so that I can have more time for investigating the possibility of performing quota check in parallel as well as the compressed inode caching. :)
Thanks,
-Jeff
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 14 lines · Jeff Liu
Hi Dave,
Quoted 10 lines · Dave Chinner
Quoted 6 lines · Jeff Liu
Hello,
This is version 2 of fix log space calculation if the log stripe unit is specified.
I changed the subject in this round since there are many changes belong to the log space reservation interface adjustment.
Hi Jeff,
Quoted 8 lines
Quoted 4 lines
Given that I'm in the middle of reworking the kernel and userspace source structures, do you might if I pull this patchset into my tree for 3.11 and rework it to fit the modified structure I have now? I'll do the same with the userspace patch if you have no objections.
That sounded fine to me so that I can have more time for investigating the possibility of performing quota check in parallel as well as the compressed inode caching. :)
Cool, I'll pick it up and work it into my current tree.
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs