code questions about xfs log implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

I'm studying xfs delayed logging codes, and currently have some questions about log
reservation, can anyone help to answer below questions, thanks in advance!

1, what's the difference between xlog's l_reserve_head and l_write_head?
Seems that l_reserve_head already can been used to do log space reservation, from
codes, I really don't get when to use l_reserve_head or l_write_head, so what different
cases are they used for?

2, what's the exact definition about permanent transaction reservation?
In xfs_trans_resv_calc(), I see many kinds of transactions have XFS_TRANS_PERM_LOG_RES
enabled, so non-permanent transaction does not need to do log reservation
at the begin?

3, struct xfs_trans_res's tr_logcount(/* number of log operations per log ticket */)
For exmaple, tr_write.tr_logcount is XFS_WRITE_LOG_COUNT_REFLINK(8), does that mean
to complete a write operation, we'll need 8 log operations, such as file block mapping
update intent will be counted one?

4, what's the exact definition about xfs rolling transactions?
Is that because we use WAL log ing xfs, so for example, if we free a file extent,
we at least create an extent free intent in one transaction, and when this transaction
is committed to disk, then do the real xfs b+ tree modifications, finally once
we completed the b+ tree modifications, we log an extent free done intent in one
new transactino? so we'll need to reserve all the needed log space an the begin,
and the whole process needs multiple transactions, so it's named rolling transactions?

5, finally are there any documents that describe the initial xfs log design before
current delayed logging design?
Documentation/filesystems/xfs-delayed-logging-design.rst is a very good document, but
seems that it assumes that readers has been familiar with initial xfs log design.


Regards,
Xiaoguang Wang



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux