• Home
  • Raw
  • Download

Lines Matching full:we

27  * recover, so we don't allow failure here. Also, we allocate in a context that
28 * we don't want to be issuing transactions from, so we need to tell the
31 * We don't reserve any space for the ticket - we are going to steal whatever
32 * space we require from transactions as they commit. To ensure we reserve all
33 * the space required, we need to set the current reservation of the ticket to
34 * zero so that we know to steal the initial transaction overhead from the
47 * set the current reservation to zero so we know to steal the basic in xlog_cil_ticket_alloc()
55 * After the first stage of log recovery is done, we know where the head and
56 * tail of the log are. We need this log initialisation done before we can
59 * Here we allocate a log ticket to track space usage during a CIL push. This
60 * ticket is passed to xlog_write() directly so that we don't slowly leak log
90 * If we do this allocation within xlog_cil_insert_format_items(), it is done
92 * the memory allocation. This means that we have a potential deadlock situation
93 * under low memory conditions when we have lots of dirty metadata pinned in
94 * the CIL and we need a CIL commit to occur to free memory.
96 * To avoid this, we need to move the memory allocation outside the
103 * process, we cannot share the buffer between the transaction commit (which
106 * unreliable, but we most definitely do not want to be allocating and freeing
113 * the incoming modification. Then during the formatting of the item we can swap
114 * the active buffer with the new one if we can't reuse the existing buffer. We
116 * it's size is right, otherwise we'll free and reallocate it at that point.
149 * Ordered items need to be tracked but we do not wish to write in xlog_cil_alloc_shadow_bufs()
150 * them. We need a logvec to track the object, but we do not in xlog_cil_alloc_shadow_bufs()
160 * We 64-bit align the length of each iovec so that the start in xlog_cil_alloc_shadow_bufs()
161 * of the next one is naturally aligned. We'll need to in xlog_cil_alloc_shadow_bufs()
171 * that space to ensure we can align it appropriately and not in xlog_cil_alloc_shadow_bufs()
177 * if we have no shadow buffer, or it is too small, we need to in xlog_cil_alloc_shadow_bufs()
184 * We free and allocate here as a realloc would copy in xlog_cil_alloc_shadow_bufs()
185 * unecessary data. We don't use kmem_zalloc() for the in xlog_cil_alloc_shadow_bufs()
186 * same reason - we don't need to zero the data area in in xlog_cil_alloc_shadow_bufs()
242 * If there is no old LV, this is the first time we've seen the item in in xfs_cil_prepare_item()
243 * this CIL context and so we need to pin it. If we are replacing the in xfs_cil_prepare_item()
245 * buffer for later freeing. In both cases we are now switching to the in xfs_cil_prepare_item()
264 * CIL, store the sequence number on the log item so we can in xfs_cil_prepare_item()
275 * For delayed logging, we need to hold a formatted buffer containing all the
283 * guaranteed to be large enough for the current modification, but we will only
284 * use that if we can't reuse the existing lv. If we can't reuse the existing
285 * lv, then simple swap it out for the shadow lv. We don't free it - that is
288 * We don't set up region headers during this process; we simply copy the
289 * regions into the flat buffer. We can do this because we still have to do a
291 * ophdrs during the iclog write means that we can support splitting large
295 * Hence what we need to do now is change the rewrite the vector array to point
296 * to the copied region inside the buffer we just allocated. This allows us to
310 /* Bail out if we didn't find a log item. */ in xlog_cil_insert_format_items()
385 * as well. Remove the amount of space we added to the checkpoint ticket from
404 * We can do this safely because the context can't checkpoint until we in xlog_cil_insert_items()
405 * are done so it doesn't matter exactly how we update the CIL. in xlog_cil_insert_items()
423 * reservation has to grow as well as the current reservation as we in xlog_cil_insert_items()
424 * steal from tickets so we can correctly determine the space used in xlog_cil_insert_items()
433 /* do we need space for more log record headers? */ in xlog_cil_insert_items()
449 * If we've overrun the reservation, dump the tx details before we move in xlog_cil_insert_items()
465 * We do this here so we only need to take the CIL lock once during in xlog_cil_insert_items()
516 * pagb_lock. Note that we need a unbounded workqueue, otherwise we might
573 * Mark all items committed and clear busy extents. We free the log vector
574 * chains in a separate pass so that we unpin the log items as quickly as
593 * If we are aborting the commit, wake up anyone waiting on the in xlog_cil_committed()
594 * committing list. If we don't, then a shutdown we can leave processes in xlog_cil_committed()
596 * will never happen because we aborted it. in xlog_cil_committed()
614 * is a background flush and so we can chose to ignore it. Otherwise, if the
615 * current sequence is the same as @push_seq we need to do a flush. If
617 * flushed and we don't need to do anything - the caller will wait for it to
621 * unlocked check of the sequence number for a match. Hence we can allows log
622 * forces to run racily and not issue pushes for the same sequence twice. If we
658 * Check if we've anything to push. If there is nothing, then we don't in xlog_cil_push()
659 * move on to a new sequence number and so we have to be able to push in xlog_cil_push()
676 * We are now going to push this context, so add it to the committing in xlog_cil_push()
677 * list before we do anything else. This ensures that anyone waiting on in xlog_cil_push()
686 * waiting on. If the CIL is not empty, we get put on the committing in xlog_cil_push()
688 * an empty CIL and an unchanged sequence number means we jumped out in xlog_cil_push()
704 * remove the items from the CIL. We don't need the CIL lock in xlog_cil_push()
738 * The switch is now done, so we can drop the context lock and move out in xlog_cil_push()
739 * of a shared context. We can't just go straight to the commit record, in xlog_cil_push()
740 * though - we need to synchronise with previous and future commits so in xlog_cil_push()
742 * that we process items during log IO completion in the correct order. in xlog_cil_push()
744 * For example, if we get an EFI in one checkpoint and the EFD in the in xlog_cil_push()
745 * next (e.g. due to log forces), we do not want the checkpoint with in xlog_cil_push()
747 * we must strictly order the commit records of the checkpoints so in xlog_cil_push()
752 * Hence we need to add this context to the committing context list so in xlog_cil_push()
758 * committing list. This also ensures that we can do unlocked checks in xlog_cil_push()
769 * begin the transaction. We need to account for the space used by the in xlog_cil_push()
772 * The LSN we need to pass to the log items on transaction commit is in xlog_cil_push()
773 * the LSN reported by the first log vector write. If we use the commit in xlog_cil_push()
774 * record lsn then we can move the tail beyond the grant write head. in xlog_cil_push()
795 * now that we've written the checkpoint into the log, strictly in xlog_cil_push()
802 * Avoid getting stuck in this loop because we were woken by the in xlog_cil_push()
841 * now the checkpoint commit is complete and we've attached the in xlog_cil_push()
842 * callbacks to the iclog we can assign the commit LSN to the context in xlog_cil_push()
876 * We need to push CIL every so often so we don't cache more than we can fit in
889 * The cil won't be empty because we are called while holding the in xlog_cil_push_background()
890 * context lock so whatever we added to the CIL will still be there in xlog_cil_push_background()
895 * don't do a background push if we haven't used up all the in xlog_cil_push_background()
932 * If the CIL is empty or we've already pushed the sequence then in xlog_cil_push_now()
933 * there's no work we need to do. in xlog_cil_push_now()
963 * To do this, we need to format the item, pin it in memory if required and
964 * account for the space used by the transaction. Once we have done that we
966 * transaction to the checkpoint context so we carry the busy extents through
985 * Do all necessary memory allocation before we lock the CIL. in xfs_log_commit_cil()
1008 * This needs to be done before we drop the CIL context lock because we in xfs_log_commit_cil()
1010 * to disk. If we don't, then the CIL checkpoint can race with us and in xfs_log_commit_cil()
1011 * we can run checkpoint completion before we've updated and unlocked in xfs_log_commit_cil()
1025 * We only need to push if we haven't already pushed the sequence
1026 * number given. Hence the only time we will trigger a push here is
1029 * We return the current commit lsn to allow the callers to determine if a
1044 * check to see if we need to force out the current context. in xlog_cil_force_lsn()
1052 * See if we can find a previous sequence still committing. in xlog_cil_force_lsn()
1053 * We need to wait for all previous sequence commits to complete in xlog_cil_force_lsn()
1060 * Avoid getting stuck in this loop because we were woken by the in xlog_cil_force_lsn()
1084 * Hence by the time we have got here it our sequence may not have been in xlog_cil_force_lsn()
1090 * Hence if we don't find the context in the committing list and the in xlog_cil_force_lsn()
1094 * it means we haven't yet started the push, because if it had started in xlog_cil_force_lsn()
1095 * we would have found the context on the committing list. in xlog_cil_force_lsn()
1107 * We detected a shutdown in progress. We need to trigger the log force in xlog_cil_force_lsn()
1109 * we are already in a shutdown state. Hence we can't return in xlog_cil_force_lsn()
1111 * LSN is already stable), so we return a zero LSN instead. in xlog_cil_force_lsn()
1120 * We can't rely on just the log item being in the CIL, we have to check
1141 * current sequence, we're in a new checkpoint. in xfs_log_item_in_current_chkpt()